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-24 11:12:27 +0300
committerDavid Benson [draw.io] <david@jgraph.com>2021-10-24 11:12:27 +0300
commit95900de429ae1b5c7351deaf685aa24fe1c854cb (patch)
treeb70c33eb10a1e42135bb96da5fbcb5dd456467c8
parent05c4ef4ac52a84a59a00bd142c842c83aad8a3b6 (diff)
15.5.9 releasev15.5.9
-rw-r--r--ChangeLog4
-rw-r--r--VERSION2
-rw-r--r--src/main/webapp/js/app.min.js829
-rw-r--r--src/main/webapp/js/diagramly/Dialogs.js4
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js16
-rw-r--r--src/main/webapp/js/diagramly/Init.js29
-rw-r--r--src/main/webapp/js/diagramly/Minimal.js13
-rw-r--r--src/main/webapp/js/diagramly/OneDriveClient.js11
-rw-r--r--src/main/webapp/js/diagramly/mxFreehand.js11
-rw-r--r--src/main/webapp/js/grapheditor/Editor.js2
-rw-r--r--src/main/webapp/js/grapheditor/Sidebar.js9
-rw-r--r--src/main/webapp/js/onedrive/mxODPicker.js22
-rw-r--r--src/main/webapp/js/viewer-static.min.js1415
-rw-r--r--src/main/webapp/js/viewer.min.js1415
-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
17 files changed, 1911 insertions, 1877 deletions
diff --git a/ChangeLog b/ChangeLog
index 6ead177a..ae25ba88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+22-OCT-2021: 15.5.9
+
+- Fixes stroke and font color in dark mode https://github.com/jgraph/drawio/issues/2338]
+
21-OCT-2021: 15.5.8
- Fixes NPE in OneDrive inline picker
diff --git a/VERSION b/VERSION
index 0e2649ca..8fef0a2b 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-15.5.8 \ No newline at end of file
+15.5.9 \ 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 a738b07a..4de2597c 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -226,16 +226,16 @@ window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=n
window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;
window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null);if(!a&&window.mxIsElectron&&(a=require("@electron/remote").app.getLocale(),null!=a)){var c=a.indexOf("-");0<=c&&(a=a.substring(0,c));a=a.toLowerCase()}}catch(d){isLocalStorage=!1}return a}();
window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",eu:"Euskara",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",
-he:"עברית",ar:"العربية",fa:"فارسی",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph",window.mxImageBasePath="mxgraph/images");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}window.location.hostname==DRAWIO_LIGHTBOX_URL.substring(DRAWIO_LIGHTBOX_URL.indexOf("//")+2)&&(urlParams.lightbox="1");"1"==urlParams.lightbox&&(urlParams.chrome="0");
-"1"==urlParams.embedInline&&(urlParams.embed="1",urlParams.ui="sketch",urlParams.plugins="0",urlParams.proto="json",urlParams.prefetchFonts="1");
-window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&isLocalStorage&&"undefined"!==typeof JSON&&"1"!=urlParams.lightbox)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}null==a&&"1"==urlParams.extAuth&&(a="sketch");try{null==a&&768>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null==urlParams.pages&&(urlParams.pages="1"),a="sketch")}catch(c){}"sketch"==a&&(urlParams.sketch=
-"1",a="min");return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
+he:"עברית",ar:"العربية",fa:"فارسی",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph",window.mxImageBasePath="mxgraph/images");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1",urlParams.lightbox="1",urlParams.layers="1");
+window.location.hostname==DRAWIO_LIGHTBOX_URL.substring(DRAWIO_LIGHTBOX_URL.indexOf("//")+2)&&(urlParams.lightbox="1");"1"==urlParams.lightbox&&(urlParams.chrome="0");"1"==urlParams.embedInline&&(urlParams.embed="1",urlParams.ui="sketch",urlParams.plugins="0",urlParams.proto="json",urlParams.prefetchFonts="1");
+window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;"1"==urlParams.extAuth&&(a="sketch");if(null==a&&isLocalStorage&&"undefined"!==typeof JSON&&"1"!=urlParams.lightbox)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}try{null==a&&768>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null==urlParams.pages&&(urlParams.pages="1"),a="sketch")}catch(c){}"sketch"==a&&(urlParams.sketch="1",a="min");
+return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(d){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];
null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net",b=a.length-c.length,c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"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.5.8",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/"),
+"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="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.5.9",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/"),
@@ -2074,10 +2074,11 @@ Editor.lightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5
Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+";Editor.redoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==";
Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.tableImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTIwIDNINWMtMS4xIDAtMiAuOS0yIDJ2MTRjMCAxLjEuOSAyIDIgMmgxNWMxLjEgMCAyLS45IDItMlY1YzAtMS4xLS45LTItMi0yem0wIDJ2M0g1VjVoMTV6bS01IDE0aC01di05aDV2OXpNNSAxMGgzdjlINXYtOXptMTIgOXYtOWgzdjloLTN6Ii8+PC9zdmc+";
-Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dots",dispName:"Dots"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=!0;Editor.simpleLabels=!1;
-Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.darkColor="#2a2a2a";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.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dots",dispName:"Dots"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;
+Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.darkColor="#2a2a2a";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,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=
@@ -2492,9 +2493,9 @@ Sidebar.prototype.createThumb=function(a,b,d,e,c,f,k,h,g){this.graph.labelsVisib
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,this.editorUi.editor.graph.defaultVertexStyle,this.editorUi.editor.graph.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.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,null,null,!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};
@@ -9956,8 +9957,8 @@ RemoteLibrary.prototype.saveAs=function(b,e,d){};RemoteLibrary.prototype.updateF
var StorageDialog=function(b,e,d){function c(c,k,g,p,x,A){function q(){mxEvent.addListener(t,"click",null!=A?A:function(){g!=App.MODE_GOOGLE||b.isDriveDomain()?g==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);e()})):g==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);e()})):
(b.setMode(g,!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",
k);var y=document.createElement("div");y.style.textOverflow="ellipsis";y.style.overflow="hidden";y.style.position="absolute";y.style.bottom="8px";y.style.left="0px";y.style.right="0px";mxUtils.write(y,k);t.appendChild(y);if(null!=c){var u=document.createElement("img");u.setAttribute("src",c);u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.style.paddingBottom="6px";t.appendChild(u)}else y.style.paddingTop="5px",y.style.whiteSpace="normal",
-mxClient.IS_IOS?(t.style.padding="0px 10px 20px 10px",t.style.top="6px"):mxClient.IS_FF&&(y.style.paddingTop="0px",y.style.marginTop="-2px");if(null!=x)for(c=0;c<x.length;c++)mxUtils.br(y),mxUtils.write(y,x[c]);if(null!=p&&null==b[p]){u.style.visibility="hidden";mxUtils.setOpacity(y,10);var v=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});v.spin(t);var H=window.setTimeout(function(){null==
-b[p]&&(v.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(H),mxUtils.setOpacity(y,100),u.style.visibility="",v.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");
+mxClient.IS_IOS?(t.style.padding="0px 10px 20px 10px",t.style.top="6px"):mxClient.IS_FF&&(y.style.paddingTop="0px",y.style.marginTop="-2px");if(null!=x)for(c=0;c<x.length;c++)mxUtils.br(y),mxUtils.write(y,x[c]);if(null!=p&&null==b[p]){u.style.visibility="hidden";mxUtils.setOpacity(y,10);var v=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});v.spin(t);var G=window.setTimeout(function(){null==
+b[p]&&(v.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(y,100),u.style.visibility="",v.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",
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%;";
@@ -9983,15 +9984,15 @@ e.length){var t=mxUtils.button("",function(){try{var c="https://www.facebook.com
"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!=H&&null!=H.getTitle()?H.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<E.length&&(c+="&s="+E);""!=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="+(y.checked?"1":"0");
-c+="&resize="+(B.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 H.constructor==DriveFile||H.constructor==DropboxFile?(c="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?c+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(c+=H.getHash().substring(1),c=H.constructor==DropboxFile?c+"&type=2":c+"&type=1"),null!=
+var GoogleSitesDialog=function(b,e){function d(){var b=null!=G&&null!=G.getTitle()?G.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="+(y.checked?"1":"0");
+c+="&resize="+(B.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 G.constructor==DriveFile||G.constructor==DropboxFile?(c="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?c+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(c+=G.getHash().substring(1),c=G.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);
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 B=document.createElement("input");B.setAttribute("type","checkbox");B.setAttribute("checked","checked");B.defaultChecked=!0;B.style.marginLeft="16px";c.appendChild(B);mxUtils.write(c,mxResources.get("resize")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";c.appendChild(y);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 E=b.getBasenames().join(";"),H=b.getCurrentFile();mxEvent.addListener(v,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(B,"change",d);mxEvent.addListener(y,"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();
+"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(B,"change",d);mxEvent.addListener(y,"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=
@@ -10019,13 +10020,13 @@ k.x,k.y):m.insertVertex(null,null,null,k.x,k.y,l,g,"shape=image;noLabel=1;vertic
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,n={};for(f=0;f<e.length;f++){var u=mxUtils.trim(e[f]);if("primary key"==u.substring(0,11).toLowerCase()){var v=u.match(/\((.+)\)/);v&&v[1]&&(n[v[1]]=!0);e.splice(f,1)}else 0<u.toLowerCase().indexOf("primary key")&&(n[u.split(" ")[0]]=
-!0,e[f]=mxUtils.trim(u.replace(/primary key/i,"")))}for(f=0;f<e.length;f++)if(u=mxUtils.trim(e[f]),"create table"==u.substring(0,12).toLowerCase())u=mxUtils.trim(u.substring(12)),"("==u.charAt(u.length-1)&&(u=mxUtils.trim(u.substring(0,u.length-1))),p=new mxCell(u,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),u=b.editor.graph.getPreferredSizeForCell(G),null!=
-u&&(p.geometry.width=u.width+10);else if(null!=p&&")"==u.charAt(0))t+=p.geometry.width+40,p=null;else if("("!=u&&null!=p){var u=u.substring(0,","==u.charAt(u.length-1)?u.length-1:u.length),v=n[u.split(" ")[0]],G=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="+(v?"1":"0")+";");G.vertex=!0;var I=new mxCell(v?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+
-(v?"fontStyle=1;":""));I.vertex=!0;G.insert(I);u=new mxCell(u,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;"+(v?"fontStyle=5;":""));u.vertex=!0;G.insert(u);u=b.editor.graph.getPreferredSizeForCell(u);null!=u&&p.geometry.width<u.width+30&&(p.geometry.width=Math.min(320,Math.max(p.geometry.width,u.width+30)));p.insert(G,v?0:null);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;G=null;q=[];for(f=p=0;f<e.length;f++)";"!=e[f].charAt(0)&&(0==e[f].length?G=null:null==G?(G=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;"),
-G.vertex=!0,q.push(G),u=m.getPreferredSizeForCell(G),null!=u&&G.geometry.width<u.width+10&&(G.geometry.width=u.width+10),p+=G.geometry.width+40):"--"==e[f]?(u=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),u.vertex=!0,G.geometry.height+=u.geometry.height,G.insert(u)):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,u=m.getPreferredSizeForCell(t),null!=u&&t.geometry.width<u.width&&(t.geometry.width=u.width),G.geometry.width=Math.max(G.geometry.width,t.geometry.width),G.geometry.height+=t.geometry.height,G.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);u=[];for(f=0;f<q.length;f++)u.push(q[f]),u=u.concat(q[f].children);m.fireEvent(new mxEventObject("cellsInserted","cells",u))}finally{m.getModel().endUpdate()}m.setSelectionCells(q);
-m.scrollCellToVisible(m.getSelectionCell())}}}else{var G=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++)";"!=e[f].charAt(0)&&(I=e[f].split("->"),2<=I.length&&(n=G(I[0]),v=G(I[I.length-1]),I=new mxCell(2<I.length?I[1]:"",new mxGeometry),I.edge=!0,n.insertEdge(I,!0),v.insertEdge(I,!1),q.push(I)));if(0<q.length){e=document.createElement("div");e.style.visibility="hidden";document.body.appendChild(e);
+!0,e[f]=mxUtils.trim(u.replace(/primary key/i,"")))}for(f=0;f<e.length;f++)if(u=mxUtils.trim(e[f]),"create table"==u.substring(0,12).toLowerCase())u=mxUtils.trim(u.substring(12)),"("==u.charAt(u.length-1)&&(u=mxUtils.trim(u.substring(0,u.length-1))),p=new mxCell(u,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),u=b.editor.graph.getPreferredSizeForCell(H),null!=
+u&&(p.geometry.width=u.width+10);else if(null!=p&&")"==u.charAt(0))t+=p.geometry.width+40,p=null;else if("("!=u&&null!=p){var u=u.substring(0,","==u.charAt(u.length-1)?u.length-1:u.length),v=n[u.split(" ")[0]],H=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="+(v?"1":"0")+";");H.vertex=!0;var I=new mxCell(v?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+
+(v?"fontStyle=1;":""));I.vertex=!0;H.insert(I);u=new mxCell(u,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;"+(v?"fontStyle=5;":""));u.vertex=!0;H.insert(u);u=b.editor.graph.getPreferredSizeForCell(u);null!=u&&p.geometry.width<u.width+30&&(p.geometry.width=Math.min(320,Math.max(p.geometry.width,u.width+30)));p.insert(H,v?0:null);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;H=null;q=[];for(f=p=0;f<e.length;f++)";"!=e[f].charAt(0)&&(0==e[f].length?H=null:null==H?(H=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;"),
+H.vertex=!0,q.push(H),u=m.getPreferredSizeForCell(H),null!=u&&H.geometry.width<u.width+10&&(H.geometry.width=u.width+10),p+=H.geometry.width+40):"--"==e[f]?(u=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),u.vertex=!0,H.geometry.height+=u.geometry.height,H.insert(u)):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,u=m.getPreferredSizeForCell(t),null!=u&&t.geometry.width<u.width&&(t.geometry.width=u.width),H.geometry.width=Math.max(H.geometry.width,t.geometry.width),H.geometry.height+=t.geometry.height,H.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);u=[];for(f=0;f<q.length;f++)u.push(q[f]),u=u.concat(q[f].children);m.fireEvent(new mxEventObject("cellsInserted","cells",u))}finally{m.getModel().endUpdate()}m.setSelectionCells(q);
+m.scrollCellToVisible(m.getSelectionCell())}}}else{var H=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++)";"!=e[f].charAt(0)&&(I=e[f].split("->"),2<=I.length&&(n=H(I[0]),v=H(I[I.length-1]),I=new mxCell(2<I.length?I[1]:"",new mxGeometry),I.edge=!0,n.insertEdge(I,!0),v.insertEdge(I,!1),q.push(I)));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])&&(u=m.getPreferredSizeForCell(q[f]),q[f].geometry.width=Math.max(q[f].geometry.width,u.width),q[f].geometry.height=Math.max(q[f].geometry.height,u.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();
u=[];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)),u=b.editor.graph.importCells(q,k.x,k.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",u))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(u);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());m.destroy();e.parentNode.removeChild(e)}}}function g(){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":
@@ -10036,58 +10037,58 @@ mxUtils.write(l,mxResources.get("diagram"));"plantUml"!=d&&f.appendChild(l);l=do
"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 B(b){null!=b&&(ra=V=b?135:140);b=!0;if(null!=ma)for(;M<ma.length&&(b||
-0!=mxUtils.mod(M,30));){var c=ma[M++],c=E(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 y(){if(pa&&null!=u)d||b.hideDialog(),u(pa,ca,L.value);else if(c)d||b.hideDialog(),c(ba,L.value,fa,ka);else{var f=L.value;null!=f&&0<f.length&&b.pickFolder(b.mode,function(c){b.createFile(f,ba,null!=ka&&0<ka.length?ka:null,null,function(){b.hideDialog()},null,c,null,null!=aa&&0<aa.length?aa:null)},b.mode!=App.MODE_GOOGLE||
-null==b.stateArg||null==b.stateArg.folderId)}}function C(b,c,d,e,m,g,k){null!=na&&(na.style.backgroundColor="transparent",na.style.border="1px solid transparent");P.removeAttribute("disabled");ba=c;ka=d;aa=g;na=b;pa=e;fa=k;ca=m;na.style.backgroundColor=f;na.style.border=l}function E(c,f,d,e,l,m,g,k,p,q,t){function n(c,f){if(null==B){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()&&(B=b.getText());f(B)}))}else f(B)}function u(f,e,l){if(null!=f&&mxUtils.isAncestorNode(document.body,v)){f=mxUtils.parseXml(f);f=Editor.parseDiagramNode(f.documentElement);var m=new mxCodec(f.ownerDocument),k=new mxGraphModel;m.decode(f,k);f=k.root.getChildAt(0).children;b.sidebar.createTooltip(v,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(){X=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;C(v,null,null,c,g,t)},!0)}}function K(f,d){null==c||J||b.sidebar.currentElt==v?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),b.sidebar.currentElt=v,J=!0,n(c,function(c){J&&b.sidebar.currentElt==v&&u(c,mxEvent.getClientX(f),mxEvent.getClientY(f));J=!1}))}var v=document.createElement("div");v.className="geTemplate";v.style.position=
+0!=mxUtils.mod(M,30));){var c=ma[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 y(){if(pa&&null!=u)d||b.hideDialog(),u(pa,ca,L.value);else if(c)d||b.hideDialog(),c(ba,L.value,fa,ka);else{var f=L.value;null!=f&&0<f.length&&b.pickFolder(b.mode,function(c){b.createFile(f,ba,null!=ka&&0<ka.length?ka:null,null,function(){b.hideDialog()},null,c,null,null!=aa&&0<aa.length?aa:null)},b.mode!=App.MODE_GOOGLE||
+null==b.stateArg||null==b.stateArg.folderId)}}function C(b,c,d,e,m,k,g){null!=na&&(na.style.backgroundColor="transparent",na.style.border="1px solid transparent");P.removeAttribute("disabled");ba=c;ka=d;aa=k;na=b;pa=e;fa=g;ca=m;na.style.backgroundColor=f;na.style.border=l}function D(c,f,d,e,l,m,k,g,p,q,t){function n(c,f){if(null==B){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()&&(B=b.getText());f(B)}))}else f(B)}function u(f,e,l){if(null!=f&&mxUtils.isAncestorNode(document.body,v)){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(v,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(){X=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;C(v,null,null,c,k,t)},!0)}}function K(f,d){null==c||J||b.sidebar.currentElt==v?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),b.sidebar.currentElt=v,J=!0,n(c,function(c){J&&b.sidebar.currentElt==v&&u(c,mxEvent.getClientX(f),mxEvent.getClientY(f));J=!1}))}var v=document.createElement("div");v.className="geTemplate";v.style.position=
"relative";v.style.height=ra+"px";v.style.width=V+"px";var B=null;Editor.isDarkMode()&&(v.style.filter="invert(100%)");null!=d?v.setAttribute("title",mxResources.get(d,null,d)):null!=e&&0<e.length&&v.setAttribute("title",e);var J=!1;if(null!=m){v.style.display="inline-flex";v.style.justifyContent="center";v.style.alignItems="center";l=document.createElement("img");l.setAttribute("src",m);l.setAttribute("alt",e);l.style.maxWidth=ra+"px";l.style.maxHeight=V+"px";var x=m.replace(".drawio.xml","").replace(".drawio",
-"").replace(".xml","");v.appendChild(l);l.onerror=function(){this.src!=x?this.src=x:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(v,mxUtils.bind(this,function(b){C(v,null,null,c,g,t)}),null,null);mxEvent.addListener(v,"dblclick",function(b){y();mxEvent.consume(b)})}else if(!q&&null!=c&&0<c.length){var A=function(b){P.setAttribute("disabled","disabled");v.style.backgroundColor="transparent";v.style.border="1px solid transparent";Q.spin(R);n(c,function(c){Q.stop();null!=
+"").replace(".xml","");v.appendChild(l);l.onerror=function(){this.src!=x?this.src=x:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(v,mxUtils.bind(this,function(b){C(v,null,null,c,k,t)}),null,null);mxEvent.addListener(v,"dblclick",function(b){y();mxEvent.consume(b)})}else if(!q&&null!=c&&0<c.length){var A=function(b){P.setAttribute("disabled","disabled");v.style.backgroundColor="transparent";v.style.border="1px solid transparent";Q.spin(R);n(c,function(c){Q.stop();null!=
c&&(C(v,c,f,null,null,t,qa),b&&y())})};e=p||TEMPLATE_PATH+"/"+c.substring(0,c.length-4)+".png";v.style.backgroundImage="url("+e+")";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";null!=d&&(v.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:'+
(ra-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(d,null,d))+"</span></td></tr></table>");mxEvent.addGestureListeners(v,mxUtils.bind(this,function(b){A()}),null,null);mxEvent.addListener(v,"dblclick",function(b){A(!0);mxEvent.consume(b)})}else v.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+
-(ra-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(d,null,d))+"</span></td></tr></table>",l&&C(v),mxEvent.addGestureListeners(v,mxUtils.bind(this,function(b){C(v,null,null,c,g)}),null,null),null!=k?mxEvent.addListener(v,"click",k):(mxEvent.addListener(v,"click",function(b){C(v,null,null,c,g)}),mxEvent.addListener(v,"dblclick",function(b){y();mxEvent.consume(b)}));if(null!=c){var F=document.createElement("img");F.setAttribute("src",Sidebar.prototype.searchImage);F.setAttribute("title",mxResources.get("preview"));
-F.className="geActiveButton";F.style.position="absolute";F.style.cursor="default";F.style.padding="8px";F.style.right="0px";F.style.top="0px";v.appendChild(F);var X=!1;mxEvent.addGestureListeners(F,mxUtils.bind(this,function(c){X=b.sidebar.currentElt==v}),null,null);mxEvent.addListener(F,"click",mxUtils.bind(this,function(b){X||K(b,F);mxEvent.consume(b)}))}R.appendChild(v);return v}function H(){function b(b,c){var f=mxResources.get(b);null==f&&(f=b.substring(0,1).toUpperCase()+b.substring(1));18<
+(ra-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(d,null,d))+"</span></td></tr></table>",l&&C(v),mxEvent.addGestureListeners(v,mxUtils.bind(this,function(b){C(v,null,null,c,k)}),null,null),null!=g?mxEvent.addListener(v,"click",g):(mxEvent.addListener(v,"click",function(b){C(v,null,null,c,k)}),mxEvent.addListener(v,"dblclick",function(b){y();mxEvent.consume(b)}));if(null!=c){var E=document.createElement("img");E.setAttribute("src",Sidebar.prototype.searchImage);E.setAttribute("title",mxResources.get("preview"));
+E.className="geActiveButton";E.style.position="absolute";E.style.cursor="default";E.style.padding="8px";E.style.right="0px";E.style.top="0px";v.appendChild(E);var X=!1;mxEvent.addGestureListeners(E,mxUtils.bind(this,function(c){X=b.sidebar.currentElt==v}),null,null);mxEvent.addListener(E,"click",mxUtils.bind(this,function(b){X||K(b,E);mxEvent.consume(b)}))}R.appendChild(v);return v}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(){S!=c&&(S.style.backgroundColor="",S=c,S.style.backgroundColor=n,R.scrollTop=0,R.innerHTML="",M=0,ma=f?ga[b][f]:ea[b],X=null,B(!1))})}ua&&(ua=!1,mxEvent.addListener(R,"scroll",function(b){R.scrollTop+R.clientHeight>=R.scrollHeight&&(B(),mxEvent.consume(b))}));if(0<oa){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"));ha.appendChild(f);for(var d in ja){var e=document.createElement("div"),l=d,f=ja[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);ha.appendChild(e);(function(b,c){mxEvent.addListener(e,"click",
function(){S!=c&&(S.style.backgroundColor="",S=c,S.style.backgroundColor=n,R.scrollTop=0,R.innerHTML="",M=0,ma=ja[b],X=null,B(!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");ha.appendChild(f)}for(d in ea){var l=ga[d],k=e=document.createElement(l?"ul":"div"),f=ea[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 y=document.createElement("li"),u=b(t,l[t]);y.setAttribute("title",u);mxUtils.write(y,u);c(d,y,t);g.appendChild(y)}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);ha.appendChild(e);null==S&&0<f.length&&(S=e,S.style.backgroundColor=n,ma=f);c(d,k)}B(!1)}var D=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 G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.height="46px";d&&F.appendChild(G);var I=document.createElement("img");I.setAttribute("border","0");I.setAttribute("align",
+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);ha.appendChild(e);null==S&&0<f.length&&(S=e,S.style.backgroundColor=n,ma=f);c(d,k)}B(!1)}var F=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 E=document.createElement("div");E.style.userSelect="none";E.style.height="100%";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.height="46px";d&&E.appendChild(H);var I=document.createElement("img");I.setAttribute("border","0");I.setAttribute("align",
"absmiddle");I.style.width="40px";I.style.height="40px";I.style.marginRight="10px";I.style.paddingBottom="4px";I.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||D||!d||G.appendChild(I);d&&mxUtils.write(G,(D?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");I=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?I=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?I=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?I=b.oneDrive.extension:b.mode==
-App.MODE_GITHUB&&null!=b.gitHub?I=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?I=b.gitLab.extension:b.mode==App.MODE_NOTION&&null!=b.notion?I=b.notion.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(I=b.trello.extension);var L=document.createElement("input");L.setAttribute("value",b.defaultFilename+I);L.style.marginLeft="10px";L.style.width=e||D?"144px":"244px";this.init=function(){d&&(L.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",
-!1,null));null!=R.parentNode&&null!=R.parentNode.parentNode&&mxEvent.addGestureListeners(R.parentNode.parentNode,mxUtils.bind(this,function(c){b.sidebar.hideTooltip()}),null,null)};d&&(G.appendChild(L),z?L.style.width=e||D?"350px":"450px":(null!=b.editor.diagramFileTypes&&(z=FilenameDialog.createFileTypes(b,L,b.editor.diagramFileTypes),z.style.marginLeft="6px",z.style.width=e||D?"80px":"180px",G.appendChild(z)),null!=b.editor.fileExtensions&&(D=FilenameDialog.createTypeHint(b,L,b.editor.fileExtensions),
-D.style.marginTop="12px",G.appendChild(D))));var G=!1,M=0,Q=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}),P=mxUtils.button(x||mxResources.get("create"),function(){P.setAttribute("disabled","disabled");y();P.removeAttribute("disabled")});P.className="geBtn gePrimaryBtn";if(q||t){var K=[],X=null,J=null,N=null,O=function(b){P.setAttribute("disabled","disabled");for(var c=0;c<K.length;c++)K[c].className=c==b?"geBtn gePrimaryBtn":
-"geBtn"},G=!0;x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height="30px";F.appendChild(x);D=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ha.style.display="";T.style.display="";R.style.left="160px";O(0);R.scrollTop=0;R.innerHTML="";M=0;X!=ma&&(ma=X,ea=J,oa=N,ha.innerHTML="",H(),X=null)});K.push(D);x.appendChild(D);var W=function(b){ha.style.display="none";T.style.display="none";R.style.left="30px";O(b?-1:1);null==X&&(X=ma);R.scrollTop=0;R.innerHTML=
-"";Q.spin(R);var c=function(b,c,f){M=0;Q.stop();ma=b;f=f||{};var d=0,e;for(e in f)d+=f[e].length;if(c)R.innerHTML=c;else if(0==b.length&&0==d)R.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(R.innerHTML="",0<d){ha.style.display="";R.style.left="160px";ha.innerHTML="";oa=0;ea={"draw.io":b};for(e in f)ea[e]=f[e];H()}else B(!0)};b?t(Y.value,c):q(c)};q&&(D=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){W()}),x.appendChild(D),K.push(D));
-if(t){D=document.createElement("span");D.style.marginLeft="10px";D.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");x.appendChild(D);var Y=document.createElement("input");Y.style.marginRight="10px";Y.style.marginLeft="10px";Y.style.width="220px";mxEvent.addListener(Y,"keypress",function(b){13==b.keyCode&&W(!0)});x.appendChild(Y);D=mxUtils.button(mxResources.get("search"),function(){W(!0)});D.className="geBtn";x.appendChild(D)}O(0)}var ka=null,aa=null,ba=null,na=null,pa=null,fa=null,ca=
-null,R=document.createElement("div");R.style.border="1px solid #d3d3d3";R.style.position="absolute";R.style.left="160px";R.style.right="34px";x=(d?72:40)+(G?30:0);R.style.top=x+"px";R.style.bottom="68px";R.style.margin="6px 0 0 -1px";R.style.padding="6px";R.style.overflow="auto";var T=document.createElement("div");T.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;height:22px;margin-top: 6px;white-space: nowrap";var ia=document.createElement("input");ia.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";
+b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||F||!d||H.appendChild(I);d&&mxUtils.write(H,(F?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");I=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?I=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?I=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?I=b.oneDrive.extension:b.mode==
+App.MODE_GITHUB&&null!=b.gitHub?I=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?I=b.gitLab.extension:b.mode==App.MODE_NOTION&&null!=b.notion?I=b.notion.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(I=b.trello.extension);var L=document.createElement("input");L.setAttribute("value",b.defaultFilename+I);L.style.marginLeft="10px";L.style.width=e||F?"144px":"244px";this.init=function(){d&&(L.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",
+!1,null));null!=R.parentNode&&null!=R.parentNode.parentNode&&mxEvent.addGestureListeners(R.parentNode.parentNode,mxUtils.bind(this,function(c){b.sidebar.hideTooltip()}),null,null)};d&&(H.appendChild(L),z?L.style.width=e||F?"350px":"450px":(null!=b.editor.diagramFileTypes&&(z=FilenameDialog.createFileTypes(b,L,b.editor.diagramFileTypes),z.style.marginLeft="6px",z.style.width=e||F?"80px":"180px",H.appendChild(z)),null!=b.editor.fileExtensions&&(F=FilenameDialog.createTypeHint(b,L,b.editor.fileExtensions),
+F.style.marginTop="12px",H.appendChild(F))));var H=!1,M=0,Q=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}),P=mxUtils.button(x||mxResources.get("create"),function(){P.setAttribute("disabled","disabled");y();P.removeAttribute("disabled")});P.className="geBtn gePrimaryBtn";if(q||t){var K=[],X=null,J=null,N=null,O=function(b){P.setAttribute("disabled","disabled");for(var c=0;c<K.length;c++)K[c].className=c==b?"geBtn gePrimaryBtn":
+"geBtn"},H=!0;x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height="30px";E.appendChild(x);F=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ha.style.display="";T.style.display="";R.style.left="160px";O(0);R.scrollTop=0;R.innerHTML="";M=0;X!=ma&&(ma=X,ea=J,oa=N,ha.innerHTML="",G(),X=null)});K.push(F);x.appendChild(F);var W=function(b){ha.style.display="none";T.style.display="none";R.style.left="30px";O(b?-1:1);null==X&&(X=ma);R.scrollTop=0;R.innerHTML=
+"";Q.spin(R);var c=function(b,c,f){M=0;Q.stop();ma=b;f=f||{};var d=0,e;for(e in f)d+=f[e].length;if(c)R.innerHTML=c;else if(0==b.length&&0==d)R.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(R.innerHTML="",0<d){ha.style.display="";R.style.left="160px";ha.innerHTML="";oa=0;ea={"draw.io":b};for(e in f)ea[e]=f[e];G()}else B(!0)};b?t(Y.value,c):q(c)};q&&(F=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){W()}),x.appendChild(F),K.push(F));
+if(t){F=document.createElement("span");F.style.marginLeft="10px";F.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");x.appendChild(F);var Y=document.createElement("input");Y.style.marginRight="10px";Y.style.marginLeft="10px";Y.style.width="220px";mxEvent.addListener(Y,"keypress",function(b){13==b.keyCode&&W(!0)});x.appendChild(Y);F=mxUtils.button(mxResources.get("search"),function(){W(!0)});F.className="geBtn";x.appendChild(F)}O(0)}var ka=null,aa=null,ba=null,na=null,pa=null,fa=null,ca=
+null,R=document.createElement("div");R.style.border="1px solid #d3d3d3";R.style.position="absolute";R.style.left="160px";R.style.right="34px";x=(d?72:40)+(H?30:0);R.style.top=x+"px";R.style.bottom="68px";R.style.margin="6px 0 0 -1px";R.style.padding="6px";R.style.overflow="auto";var T=document.createElement("div");T.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;height:22px;margin-top: 6px;white-space: nowrap";var ia=document.createElement("input");ia.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";
ia.setAttribute("placeholder",mxResources.get("search"));ia.setAttribute("type","text");T.appendChild(ia);var U=document.createElement("img"),Z="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";U.setAttribute("src",Z);U.setAttribute("title",mxResources.get("search"));U.style.position="relative";U.style.left="-18px";U.style.top="1px";U.style.background="url('"+b.editor.transparentImage+"')";T.appendChild(U);mxEvent.addListener(U,"click",function(){U.getAttribute("src")==
Dialog.prototype.closeImage&&(U.setAttribute("src",Z),U.setAttribute("title",mxResources.get("search")),ia.value="",null!=da&&(da.click(),da=null));ia.focus()});mxEvent.addListener(ia,"keydown",mxUtils.bind(this,function(b){if(13==b.keyCode){var c=ia.value;if(""==c)null!=da&&(da.click(),da=null);else{if(null==NewDialog.tagsList[p]){var f={},d;for(d in ea)for(var e=ea[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<oa&&null==f.__tagsList__){for(d in ja)for(e=ja[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++}R.scrollTop=
0;R.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]));R.appendChild(f);null!=S&&null==da&&(S.style.backgroundColor="",da=S,S=f);ma=d;X=null;B(!1)}mxEvent.consume(b)}}));mxEvent.addListener(ia,"keyup",mxUtils.bind(this,function(b){""==ia.value?(U.setAttribute("src",Z),U.setAttribute("title",mxResources.get("search"))):(U.setAttribute("src",Dialog.prototype.closeImage),
U.setAttribute("title",mxResources.get("reset")))}));x+=23;var ha=document.createElement("div");ha.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(R,"scroll",function(){b.sidebar.hideTooltip()});var ra=140,V=140,ea={},ga={},ja={},oa=0,ua=!0,S=null,da=null;ea.basic=[{title:"blankDiagram",select:!0}];var ma=ea.basic;if(!e){var sa=function(){mxUtils.get(qa,function(b){if(!la){la=!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=ea[d];null==l&&
-(l=[],ea[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=ga[d],null==l&&(l={},ga[d]=l),d=l[f],null==d&&(d=[],l[f]=d),d.push(e))}b=b.nextSibling}Q.stop();H()}})};F.appendChild(T);F.appendChild(ha);F.appendChild(R);var la=!1,qa=p;/^https?:\/\//.test(qa)&&!b.editor.isCorsEnabledForUrl(qa)&&
-(qa=PROXY_URL+"?url="+encodeURIComponent(qa));Q.spin(R);null!=A?A(function(b,c){ja=b;N=oa=c;sa()},sa):sa();J=ea}mxEvent.addListener(L,"keypress",function(c){b.dialog.container.firstChild==F&&13==c.keyCode&&y()});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(L.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(P);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?
+(l=[],ea[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=ga[d],null==l&&(l={},ga[d]=l),d=l[f],null==d&&(d=[],l[f]=d),d.push(e))}b=b.nextSibling}Q.stop();G()}})};E.appendChild(T);E.appendChild(ha);E.appendChild(R);var la=!1,qa=p;/^https?:\/\//.test(qa)&&!b.editor.isCorsEnabledForUrl(qa)&&
+(qa=PROXY_URL+"?url="+encodeURIComponent(qa));Q.spin(R);null!=A?A(function(b,c){ja=b;N=oa=c;sa()},sa):sa();J=ea}mxEvent.addListener(L,"keypress",function(c){b.dialog.container.firstChild==E&&13==c.keyCode&&y()});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||"1"==urlParams.noDevice||(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(L.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(P);b.editor.cancelFirst||null!=c||g&&null==k||A.appendChild(x);E.appendChild(A);this.container=E};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:E.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}}B(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 y=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(y),mxUtils.setOpacity(p,100),k.style.visibility="",t.stop(),m())}))}else m();H.appendChild(g);++D==q&&(mxUtils.br(H),D=0)}function B(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 y=document.createElement("h2");mxUtils.write(y,g||mxResources.get("create"));
+function(){null!=b[l]&&(window.clearTimeout(y),mxUtils.setOpacity(p,100),k.style.visibility="",t.stop(),m())}))}else m();G.appendChild(g);++F==q&&(mxUtils.br(G),F=0)}function B(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 y=document.createElement("h2");mxUtils.write(y,g||mxResources.get("create"));
y.style.marginTop="0px";y.style.marginBottom="24px";k.appendChild(y);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 E=v?t:btoa(unescape(encodeURIComponent(t)));g.setAttribute("src","data:"+u+";base64,"+E);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(E,"image/png");c=new ClipboardItem({"image/png":c,"text/html":new Blob(['<img src="data:'+u+";base64,"+E+'">'],{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)||B("_blank")}))}mxUtils.br(k);var H=document.createElement("div");H.style.textAlign="center";var D=0;H.style.marginTop="6px";k.appendChild(H);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(){B(null)}),t.className="geBtn",
-f.appendChild(t));l&&Editor.popupsAllowed&&(l=mxUtils.button(mxResources.get("openInNewWindow"),function(){B("_blank")}),l.className="geBtn",f.appendChild(l));CreateDialog.showDownloadButton&&(l=mxUtils.button(mxResources.get("download"),function(){B("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?B(App.MODE_DEVICE):27==c.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});k.appendChild(f);this.container=k};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+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("1"!=urlParams.noDevice&&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)||B("_blank")}))}mxUtils.br(k);var G=document.createElement("div");G.style.textAlign="center";var F=0;G.style.marginTop="6px";k.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!=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(){B(null)}),
+t.className="geBtn",f.appendChild(t));l&&Editor.popupsAllowed&&(l=mxUtils.button(mxResources.get("openInNewWindow"),function(){B("_blank")}),l.className="geBtn",f.appendChild(l));CreateDialog.showDownloadButton&&(l=mxUtils.button(mxResources.get("download"),function(){B("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?B(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=
"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=
@@ -10123,11 +10124,11 @@ f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});mxEvent.ad
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,
-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,B=null,y=null,C=null,E=mxUtils.button("",function(){null!=y&&f.zoomIn()});E.className="geSprite geSprite-zoomin";E.setAttribute("title",mxResources.get("zoomIn"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled","disabled");
-mxUtils.setOpacity(E,20);var H=mxUtils.button("",function(){null!=y&&f.zoomOut()});H.className="geSprite geSprite-zoomout";H.setAttribute("title",mxResources.get("zoomOut"));H.style.outline="none";H.style.border="none";H.style.margin="2px";H.setAttribute("disabled","disabled");mxUtils.setOpacity(H,20);var D=mxUtils.button("",function(){null!=y&&(f.maxFitScale=8,f.fit(8),f.center())});D.className="geSprite geSprite-fit";D.setAttribute("title",mxResources.get("fit"));D.style.outline="none";D.style.border=
-"none";D.style.margin="2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var F=mxUtils.button("",function(){null!=y&&(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 G=mxUtils.button("",function(){});G.className="geSprite geSprite-middle";G.setAttribute("title",mxResources.get("compare"));
-G.style.outline="none";G.style.border="none";G.style.margin="2px";mxUtils.setOpacity(G,60);var I=k.cloneNode(!1);I.style.pointerEvent="none";k.parentNode.appendChild(I);var L=new Graph(I);L.setTooltips(!1);L.setEnabled(!1);L.setPanning(!0);L.panningHandler.ignoreCell=!0;L.panningHandler.useLeftButtonForPanning=!0;L.minFitScale=null;L.maxFitScale=null;L.centerZoom=!0;mxEvent.addGestureListeners(G,function(b){b=A[m[l].getAttribute("id")];mxUtils.setOpacity(G,20);n.innerHTML="";null==b?mxUtils.write(n,
-mxResources.get("pageNotFound")):(M.style.display="none",k.style.display="none",I.style.display="",I.style.backgroundColor=k.style.backgroundColor,b=Editor.parseDiagramNode(b),(new mxCodec(b.ownerDocument)).decode(b,L.getModel()),L.view.scaleAndTranslate(f.view.scale,f.view.translate.x,f.view.translate.y))},null,function(){mxUtils.setOpacity(G,60);n.innerHTML="";"none"==k.style.display&&(M.style.display="",k.style.display="",I.style.display="none")});var M=document.createElement("div");M.style.position=
+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,B=null,y=null,C=null,D=mxUtils.button("",function(){null!=y&&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 G=mxUtils.button("",function(){null!=y&&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 F=mxUtils.button("",function(){null!=y&&(f.maxFitScale=8,f.fit(8),f.center())});F.className="geSprite geSprite-fit";F.setAttribute("title",mxResources.get("fit"));F.style.outline="none";F.style.border=
+"none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var E=mxUtils.button("",function(){null!=y&&(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 H=mxUtils.button("",function(){});H.className="geSprite geSprite-middle";H.setAttribute("title",mxResources.get("compare"));
+H.style.outline="none";H.style.border="none";H.style.margin="2px";mxUtils.setOpacity(H,60);var I=k.cloneNode(!1);I.style.pointerEvent="none";k.parentNode.appendChild(I);var L=new Graph(I);L.setTooltips(!1);L.setEnabled(!1);L.setPanning(!0);L.panningHandler.ignoreCell=!0;L.panningHandler.useLeftButtonForPanning=!0;L.minFitScale=null;L.maxFitScale=null;L.centerZoom=!0;mxEvent.addGestureListeners(H,function(b){b=A[m[l].getAttribute("id")];mxUtils.setOpacity(H,20);n.innerHTML="";null==b?mxUtils.write(n,
+mxResources.get("pageNotFound")):(M.style.display="none",k.style.display="none",I.style.display="",I.style.backgroundColor=k.style.backgroundColor,b=Editor.parseDiagramNode(b),(new mxCodec(b.ownerDocument)).decode(b,L.getModel()),L.view.scaleAndTranslate(f.view.scale,f.view.translate.x,f.view.translate.y))},null,function(){mxUtils.setOpacity(H,60);n.innerHTML="";"none"==k.style.display&&(M.style.display="",k.style.display="",I.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 Q=mxUtils.button(mxResources.get("download"),function(){if(null!=y){var c=mxUtils.getXml(y.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"))}});Q.className="geBtn";Q.setAttribute("disabled","disabled");var P=mxUtils.button(mxResources.get("restore"),function(c){null!=y&&null!=C&&(mxEvent.isShiftDown(c)?null!=y&&(c=b.getPagesForNode(y.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,
@@ -10137,42 +10138,42 @@ x=document.createElement("div");x.style.position="absolute";x.style.top="482px";
"0px";Y.style.width="100%";var ka=document.createElement("tbody"),aa=(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 ba=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 B=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="";y=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&&B(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);X=function(){try{var c=parseInt(K.value);p=l=c;B(m[c])}catch(V){K.value=l,b.handleError(V)}}}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"));E.removeAttribute("disabled");H.removeAttribute("disabled");D.removeAttribute("disabled");F.removeAttribute("disabled");G.removeAttribute("disabled");null!=v&&v.isRestricted()||(b.editor.graph.isEnabled()&&P.removeAttribute("disabled"),Q.removeAttribute("disabled"),N.removeAttribute("disabled"),J.removeAttribute("disabled"));mxUtils.setOpacity(E,60);mxUtils.setOpacity(H,60);mxUtils.setOpacity(D,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(G,60)}else K.style.display="none",
+g.getAttribute("title"));D.removeAttribute("disabled");G.removeAttribute("disabled");F.removeAttribute("disabled");E.removeAttribute("disabled");H.removeAttribute("disabled");null!=v&&v.isRestricted()||(b.editor.graph.isEnabled()&&P.removeAttribute("disabled"),Q.removeAttribute("disabled"),N.removeAttribute("disabled"),J.removeAttribute("disabled"));mxUtils.setOpacity(D,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(E,60);mxUtils.setOpacity(H,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()===aa?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){B!=c&&(u.stop(),null!=z&&(z.style.backgroundColor=""),B=c,z=g,z.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",C=y=null,M.removeAttribute("title"),M.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+
-"..."),k.style.backgroundColor=f.defaultPageBackgroundColor,n.innerHTML="",f.getModel().clear(),P.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),mxUtils.setOpacity(E,20),
-mxUtils.setOpacity(H,20),mxUtils.setOpacity(D,20),mxUtils.setOpacity(F,20),mxUtils.setOpacity(G,20),u.spin(k),c.getXml(function(b){if(B==c)try{q(b)}catch(U){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+U.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){N.click();window.getSelection?
+"..."),k.style.backgroundColor=f.defaultPageBackgroundColor,n.innerHTML="",f.getModel().clear(),P.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),mxUtils.setOpacity(D,20),
+mxUtils.setOpacity(G,20),mxUtils.setOpacity(F,20),mxUtils.setOpacity(E,20),mxUtils.setOpacity(H,20),u.spin(k),c.getXml(function(b){if(B==c)try{q(b)}catch(U){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+U.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){N.click();window.getSelection?
window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(b)},!1);ka.appendChild(g)}return g}(e[t]);null!=ba&&t==e.length-1&&(W=ba)}Y.appendChild(ka);g.appendChild(Y)}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!=W&&W.click()};g=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});g.className="geBtn";O.appendChild(K);O.appendChild(E);O.appendChild(H);O.appendChild(F);O.appendChild(D);O.appendChild(G);b.editor.cancelFirst?(x.appendChild(g),x.appendChild(Q),x.appendChild(J),x.appendChild(P),x.appendChild(N)):(x.appendChild(Q),x.appendChild(J),x.appendChild(P),x.appendChild(N),x.appendChild(g));c.appendChild(x);c.appendChild(O);c.appendChild(M);this.container=c},DraftDialog=
+this.init=function(){null!=W&&W.click()};g=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});g.className="geBtn";O.appendChild(K);O.appendChild(D);O.appendChild(G);O.appendChild(E);O.appendChild(F);O.appendChild(H);b.editor.cancelFirst?(x.appendChild(g),x.appendChild(Q),x.appendChild(J),x.appendChild(P),x.appendChild(N)):(x.appendChild(Q),x.appendChild(J),x.appendChild(P),x.appendChild(N),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(){B=mxUtils.parseXml(l[q.value].data);y=b.editor.extractGraphModel(B.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 B=mxUtils.parseXml(d),y=b.editor.extractGraphModel(B.documentElement,!0),C=0,E=null,H=z.getGlobalVariable;z.getGlobalVariable=function(b){return"page"==b&&null!=E&&null!=E[C]?E[C].getAttribute("name"):"pagenumber"==
-b?C+1:"pagecount"==b?null!=E?E.length:1:H.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);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 B=mxUtils.parseXml(d),y=b.editor.extractGraphModel(B.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 D=document.createElement("select");D.style.maxWidth="80px";D.style.position="relative";D.style.top="-2px";D.style.verticalAlign="bottom";D.style.marginRight="6px";
-D.style.display="none";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(D,"change",function(b){C=parseInt(D.value);c(E[C]);mxEvent.consume(b)});if("mxfile"==y.nodeName){var f=y.getElementsByTagName("diagram");E=[];for(var d=0;d<f.length;d++)E.push(f[d]);
-0<E.length&&c(E[C]);D.innerHTML="";if(1<E.length)for(D.style.display="",d=0;d<E.length;d++)f=document.createElement("option"),mxUtils.write(f,E[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),f.setAttribute("value",d),d==C&&f.setAttribute("selected","selected"),D.appendChild(f);else D.style.display="none"}else b(y)};x.appendChild(D);x.appendChild(d);x.appendChild(p);x.appendChild(u);x.appendChild(e);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.className=
+"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 F=document.createElement("select");F.style.maxWidth="80px";F.style.position="relative";F.style.top="-2px";F.style.verticalAlign="bottom";F.style.marginRight="6px";
+F.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(F,"change",function(b){C=parseInt(F.value);c(D[C]);mxEvent.consume(b)});if("mxfile"==y.nodeName){var f=y.getElementsByTagName("diagram");D=[];for(var d=0;d<f.length;d++)D.push(f[d]);
+0<D.length&&c(D[C]);F.innerHTML="";if(1<D.length)for(F.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"),F.appendChild(f);else F.style.display="none"}else b(y)};x.appendChild(F);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&&E.value?(Q.removeAttribute("disabled"),P.removeAttribute("disabled")):(Q.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));E.value&&C.value?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}function l(c,d,e){L.innerHTML="";var m=p.model.getDescendants(p.model.getRoot()),
-g=C.value.toLowerCase(),y=H.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 J,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){J=X;break}c=(J+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!=J);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(X=0;X<m.length;X++){J=p.view.getState(m[X]);d&&null!=y&&(B=B||J==t);if(null!=J&&null!=J.cell.value&&(B||null==K)&&(p.model.isVertex(J.cell)||p.model.isEdge(J.cell))){null!=J.style&&"1"==J.style.html?(F.innerHTML=p.sanitizeHtml(p.getLabel(J.cell)),label=mxUtils.extractTextWithWhitespace([F])):label=p.getLabel(J.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var O=0;d&&k&&null!=y&&J==t&&(label=label.substr(A),O=A);var N=""==E.value,z=N;if(null==y&&(z&&
-0<=label.indexOf(g)||!z&&label.substring(0,g.length)===g||N&&n(y,J.cell,g,z))||null!=y&&(y.test(label)||N&&n(y,J.cell,g,z)))if(k&&(null!=y?(N=label.match(y),x=N[0].toLowerCase(),A=O+N.index+x.length):(x=g,A=x.length)),B){K=J;break}else null==K&&(K=J)}B=B||J==t}}if(null!=K){if(X==m.length&&D.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&&
-D.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,B=document.createElement("div");B.style.userSelect="none";B.style.overflow="hidden";B.style.padding="10px";B.style.height="100%";var y=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=y;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";B.appendChild(C);mxUtils.br(B);var E;k&&(E=document.createElement("input"),E.setAttribute("placeholder",mxResources.get("replaceWith")),E.setAttribute("type","text"),E.style.marginTop="4px",E.style.marginBottom="6px",E.style.width=y,E.style.fontSize="12px",E.style.borderRadius="4px",E.style.padding="6px",B.appendChild(E),mxUtils.br(B),mxEvent.addListener(E,"input",f));var H=document.createElement("input");
-H.setAttribute("id","geFindWinRegExChck");H.setAttribute("type","checkbox");H.style.marginRight="4px";B.appendChild(H);y=document.createElement("label");y.setAttribute("for","geFindWinRegExChck");B.appendChild(y);mxUtils.write(y,mxResources.get("regularExpression"));B.appendChild(y);y=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");y.style.position="relative";y.style.marginLeft="6px";y.style.top="-1px";B.appendChild(y);mxUtils.br(B);var D=document.createElement("input");D.setAttribute("id",
-"geFindWinAllPagesChck");D.setAttribute("type","checkbox");D.style.marginRight="4px";B.appendChild(D);y=document.createElement("label");y.setAttribute("for","geFindWinAllPagesChck");B.appendChild(y);mxUtils.write(y,mxResources.get("allPages"));B.appendChild(y);var F=document.createElement("div");mxUtils.br(B);y=document.createElement("div");y.style.left="0px";y.style.right="0px";y.style.marginTop="6px";y.style.padding="0 6px 0 6px";y.style.textAlign="center";B.appendChild(y);var G=mxUtils.button(mxResources.get("reset"),
-function(){L.innerHTML="";C.value="";C.style.backgroundColor="";k&&(E.value="",f());q=t=null;v=!1;C.focus()});G.setAttribute("title",mxResources.get("reset"));G.style["float"]="none";G.style.width="120px";G.style.marginTop="6px";G.style.marginLeft="8px";G.style.overflow="hidden";G.style.textOverflow="ellipsis";G.className="geBtn";k||y.appendChild(G);var I=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=l()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(J){b.handleError(J)}});
+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?(Q.removeAttribute("disabled"),P.removeAttribute("disabled")):(Q.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));D.value&&C.value?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}function l(c,d,e){L.innerHTML="";var m=p.model.getDescendants(p.model.getRoot()),
+g=C.value.toLowerCase(),y=G.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 J,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){J=X;break}c=(J+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!=J);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(X=0;X<m.length;X++){J=p.view.getState(m[X]);d&&null!=y&&(B=B||J==t);if(null!=J&&null!=J.cell.value&&(B||null==K)&&(p.model.isVertex(J.cell)||p.model.isEdge(J.cell))){null!=J.style&&"1"==J.style.html?(E.innerHTML=p.sanitizeHtml(p.getLabel(J.cell)),label=mxUtils.extractTextWithWhitespace([E])):label=p.getLabel(J.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var O=0;d&&k&&null!=y&&J==t&&(label=label.substr(A),O=A);var N=""==D.value,z=N;if(null==y&&(z&&
+0<=label.indexOf(g)||!z&&label.substring(0,g.length)===g||N&&n(y,J.cell,g,z))||null!=y&&(y.test(label)||N&&n(y,J.cell,g,z)))if(k&&(null!=y?(N=label.match(y),x=N[0].toLowerCase(),A=O+N.index+x.length):(x=g,A=x.length)),B){K=J;break}else null==K&&(K=J)}B=B||J==t}}if(null!=K){if(X==m.length&&F.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&&
+F.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,B=document.createElement("div");B.style.userSelect="none";B.style.overflow="hidden";B.style.padding="10px";B.style.height="100%";var y=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=y;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";B.appendChild(C);mxUtils.br(B);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=y,D.style.fontSize="12px",D.style.borderRadius="4px",D.style.padding="6px",B.appendChild(D),mxUtils.br(B),mxEvent.addListener(D,"input",f));var G=document.createElement("input");
+G.setAttribute("id","geFindWinRegExChck");G.setAttribute("type","checkbox");G.style.marginRight="4px";B.appendChild(G);y=document.createElement("label");y.setAttribute("for","geFindWinRegExChck");B.appendChild(y);mxUtils.write(y,mxResources.get("regularExpression"));B.appendChild(y);y=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");y.style.position="relative";y.style.marginLeft="6px";y.style.top="-1px";B.appendChild(y);mxUtils.br(B);var F=document.createElement("input");F.setAttribute("id",
+"geFindWinAllPagesChck");F.setAttribute("type","checkbox");F.style.marginRight="4px";B.appendChild(F);y=document.createElement("label");y.setAttribute("for","geFindWinAllPagesChck");B.appendChild(y);mxUtils.write(y,mxResources.get("allPages"));B.appendChild(y);var E=document.createElement("div");mxUtils.br(B);y=document.createElement("div");y.style.left="0px";y.style.right="0px";y.style.marginTop="6px";y.style.padding="0 6px 0 6px";y.style.textAlign="center";B.appendChild(y);var H=mxUtils.button(mxResources.get("reset"),
+function(){L.innerHTML="";C.value="";C.style.backgroundColor="";k&&(D.value="",f());q=t=null;v=!1;C.focus()});H.setAttribute("title",mxResources.get("reset"));H.style["float"]="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn";k||y.appendChild(H);var I=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=l()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(J){b.handleError(J)}});
I.setAttribute("title",mxResources.get("find")+" (Enter)");I.style["float"]="none";I.style.width="120px";I.style.marginTop="6px";I.style.marginLeft="8px";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.className="geBtn gePrimaryBtn";y.appendChild(I);var L=document.createElement("div");L.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},Q=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=x&&null!=t&&E.value){var c=t.cell,f=p.getLabel(c);
-p.isCellEditable(c)&&p.model.setValue(c,M(f,x,E.value,A-x.length,p.getCurrentCellStyle(c)));C.style.backgroundColor=l(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(O){b.handleError(O)}});Q.setAttribute("title",mxResources.get("replFind"));Q.style["float"]="none";Q.style.width="120px";Q.style.marginTop="6px";Q.style.marginLeft="8px";Q.style.overflow="hidden";Q.style.textOverflow="ellipsis";Q.className="geBtn gePrimaryBtn";Q.setAttribute("disabled","disabled");y.appendChild(Q);mxUtils.br(y);
-var P=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=x&&null!=t&&E.value){var c=t.cell,f=p.getLabel(c);p.model.setValue(c,M(f,x,E.value,A-x.length,p.getCurrentCellStyle(c)));Q.setAttribute("disabled","disabled");P.setAttribute("disabled","disabled")}}catch(O){b.handleError(O)}});P.setAttribute("title",mxResources.get("replace"));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");y.appendChild(P);var K=mxUtils.button(mxResources.get("replaceAll"),function(){L.innerHTML="";if(E.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,E.value,
+-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},Q=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)}});Q.setAttribute("title",mxResources.get("replFind"));Q.style["float"]="none";Q.style.width="120px";Q.style.marginTop="6px";Q.style.marginLeft="8px";Q.style.overflow="hidden";Q.style.textOverflow="ellipsis";Q.className="geBtn gePrimaryBtn";Q.setAttribute("disabled","disabled");y.appendChild(Q);mxUtils.br(y);
+var P=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)));Q.setAttribute("disabled","disabled");P.setAttribute("disabled","disabled")}}catch(O){b.handleError(O)}});P.setAttribute("title",mxResources.get("replace"));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");y.appendChild(P);var K=mxUtils.button(mxResources.get("replaceAll"),function(){L.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(L,mxResources.get("matchesRepl",[d]))}catch(ba){b.handleError(ba)}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");y.appendChild(K);mxUtils.br(y);y.appendChild(G);G=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));G.setAttribute("title",mxResources.get("close"));G.style["float"]="none";G.style.width="120px";G.style.marginTop="6px";G.style.marginLeft="8px";G.style.overflow="hidden";G.style.textOverflow="ellipsis";G.className="geBtn";y.appendChild(G);mxUtils.br(y);y.appendChild(L)}else G.style.width=
+K.className="geBtn gePrimaryBtn";K.setAttribute("disabled","disabled");y.appendChild(K);mxUtils.br(y);y.appendChild(H);H=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));H.setAttribute("title",mxResources.get("close"));H.style["float"]="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn";y.appendChild(H);mxUtils.br(y);y.appendChild(L)}else H.style.width=
"90px",I.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(N){C.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(B,"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"):""),B,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?D.removeAttribute("disabled"):
-(D.checked=!1,D.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)};
+this.window=new mxWindow(mxResources.get("find")+(k?"/"+mxResources.get("replace"):""),B,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?F.removeAttribute("disabled"):
+(F.checked=!1,F.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 X=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",X);this.destroy=function(){mxEvent.removeListener(window,"resize",X);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()}));
@@ -10214,28 +10215,28 @@ document.createElement("td");mxUtils.write(l,mxResources.get("height")+":");var
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 B=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()}});B.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(b){13==b.keyCode&&B.click()});k=document.createElement("div");k.style.marginTop="20px";k.style.textAlign="right";b.editor.cancelFirst?(k.appendChild(c),k.appendChild(B)):(k.appendChild(B),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(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=H.title&&0<H.title.length?H.title:mxResources.get("untitled"));I.style.color=null==H.title||0==
-H.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var J=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}J>F?(F=Math.round(100*F/J),J=100):(J=Math.round(100*J/F),F=100);var D=document.createElement("div");D.setAttribute("draggable","true");D.style.display="inline-block";D.style.position="relative";D.style.padding="0 12px";D.style.cursor="move";mxUtils.setPrefixedStyle(D.style,"transition",
-"transform .1s ease-in-out");if(null!=c){var z=document.createElement("img");z.setAttribute("src",y.convert(c));z.style.width=J+"px";z.style.height=F+"px";z.style.margin="10px";z.style.paddingBottom=Math.floor((100-F)/2)+"px";z.style.paddingLeft=Math.floor((100-J)/2)+"px";D.appendChild(z)}else if(null!=k){var M=b.stringToCells(Graph.decompress(k.xml));0<M.length&&(b.sidebar.createThumb(M,100,100,D,null,!0,!1),D.firstChild.style.display="inline-block",D.firstChild.style.cursor="")}var E=document.createElement("img");
-E.setAttribute("src",Editor.closeBlackImage);E.setAttribute("border","0");E.setAttribute("title",mxResources.get("delete"));E.setAttribute("align","top");E.style.paddingTop="4px";E.style.position="absolute";E.style.marginLeft="-12px";E.style.zIndex="1";E.style.cursor="pointer";mxEvent.addListener(E,"dragstart",function(b){mxEvent.consume(b)});(function(b,c,f){mxEvent.addListener(E,"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}D.parentNode.removeChild(b);0==p.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(d)});mxEvent.addListener(E,"dblclick",function(b){mxEvent.consume(b)})})(D,c,k);D.appendChild(E);D.style.marginBottom="30px";var I=document.createElement("div");I.style.position="absolute";I.style.boxSizing="border-box";I.style.bottom="-18px";I.style.left="10px";I.style.right="10px";I.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:
-"#ffffff";I.style.overflow="hidden";I.style.textAlign="center";var H=null;null!=c?(H={data:c,w:m,h:g,title:t},null!=q&&(H.aspect=q),x[c]=z,p.push(H)):null!=k&&(k.aspect="fixed",p.push(k),H=k);mxEvent.addListener(I,"keydown",function(b){13==b.keyCode&&null!=B&&(B(),B=null,mxEvent.consume(b))});K();D.appendChild(I);mxEvent.addListener(I,"mousedown",function(b){"true"!=I.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"!=I.getAttribute("contentEditable")){null!=B&&(B(),B=null);if(null==H.title||0==H.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor="text";I.style.color="";I.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(I.style,
-"user-select","text");I.focus();document.execCommand("selectAll",!1,null);B=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";H.title=I.innerHTML;K()};mxEvent.consume(c)}};mxEvent.addListener(I,"click",M);mxEvent.addListener(D,"dblclick",M);u.appendChild(D);mxEvent.addListener(D,"dragstart",function(b){null==c&&null!=k&&(E.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=k.xml&&b.dataTransfer.setData("Text",k.xml);A=n(b);mxClient.IS_GC&&(D.style.opacity=
-"0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(D.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(D,30);E.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(D,"dragend",function(b){"hidden"==E.style.visibility&&(E.style.visibility="",I.style.visibility="");A=null;mxUtils.setOpacity(D,100);mxUtils.setPrefixedStyle(D.style,"transform",null)})}else C||(C=!0,b.handleError({message:mxResources.get("fileExists")}));else{m=!1;try{if(J=mxUtils.parseXml(c),"mxlibrary"==
-J.documentElement.nodeName){F=JSON.parse(mxUtils.getTextContent(J.documentElement));if(null!=F&&0<F.length)for(var G=0;G<F.length;G++)null!=F[G].xml?f(null,null,0,0,0,0,F[G]):f(F[G].data,null,0,0,F[G].w,F[G].h,null,"fixed",F[G].title);m=!0}else if("mxfile"==J.documentElement.nodeName){for(var Q=J.documentElement.getElementsByTagName("diagram"),G=0;G<Q.length;G++){var F=mxUtils.getTextContent(Q[G]),M=b.stringToCells(Graph.decompress(F)),L=b.editor.graph.getBoundingBoxFromGeometry(M);f(null,null,0,
-0,0,0,{xml:F,w:L.width,h:L.height})}m=!0}}catch(R){}m||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(R){}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]));
-else if(0<c.dataTransfer.files.length)b.importFiles(c.dataTransfer.files,0,0,b.maxImageSize,E(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");
+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(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=G.title&&0<G.title.length?G.title:mxResources.get("untitled"));I.style.color=null==G.title||0==
+G.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var J=m,E=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}J>E?(E=Math.round(100*E/J),J=100):(J=Math.round(100*J/E),E=100);var F=document.createElement("div");F.setAttribute("draggable","true");F.style.display="inline-block";F.style.position="relative";F.style.padding="0 12px";F.style.cursor="move";mxUtils.setPrefixedStyle(F.style,"transition",
+"transform .1s ease-in-out");if(null!=c){var z=document.createElement("img");z.setAttribute("src",y.convert(c));z.style.width=J+"px";z.style.height=E+"px";z.style.margin="10px";z.style.paddingBottom=Math.floor((100-E)/2)+"px";z.style.paddingLeft=Math.floor((100-J)/2)+"px";F.appendChild(z)}else if(null!=k){var M=b.stringToCells(Graph.decompress(k.xml));0<M.length&&(b.sidebar.createThumb(M,100,100,F,null,!0,!1),F.firstChild.style.display="inline-block",F.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}F.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)})})(F,c,k);F.appendChild(D);F.style.marginBottom="30px";var I=document.createElement("div");I.style.position="absolute";I.style.boxSizing="border-box";I.style.bottom="-18px";I.style.left="10px";I.style.right="10px";I.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:
+"#ffffff";I.style.overflow="hidden";I.style.textAlign="center";var G=null;null!=c?(G={data:c,w:m,h:g,title:t},null!=q&&(G.aspect=q),x[c]=z,p.push(G)):null!=k&&(k.aspect="fixed",p.push(k),G=k);mxEvent.addListener(I,"keydown",function(b){13==b.keyCode&&null!=B&&(B(),B=null,mxEvent.consume(b))});K();F.appendChild(I);mxEvent.addListener(I,"mousedown",function(b){"true"!=I.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,G.title||"",mxResources.get("ok"),function(b){null!=b&&(G.title=b,K())},mxResources.get("enterValue"));b.showDialog(f.container,300,80,!0,!0);f.init();mxEvent.consume(c)}else if("true"!=I.getAttribute("contentEditable")){null!=B&&(B(),B=null);if(null==G.title||0==G.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor="text";I.style.color="";I.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(I.style,
+"user-select","text");I.focus();document.execCommand("selectAll",!1,null);B=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";G.title=I.innerHTML;K()};mxEvent.consume(c)}};mxEvent.addListener(I,"click",M);mxEvent.addListener(F,"dblclick",M);u.appendChild(F);mxEvent.addListener(F,"dragstart",function(b){null==c&&null!=k&&(D.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=k.xml&&b.dataTransfer.setData("Text",k.xml);A=n(b);mxClient.IS_GC&&(F.style.opacity=
+"0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(F.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(F,30);D.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(F,"dragend",function(b){"hidden"==D.style.visibility&&(D.style.visibility="",I.style.visibility="");A=null;mxUtils.setOpacity(F,100);mxUtils.setPrefixedStyle(F.style,"transform",null)})}else C||(C=!0,b.handleError({message:mxResources.get("fileExists")}));else{m=!1;try{if(J=mxUtils.parseXml(c),"mxlibrary"==
+J.documentElement.nodeName){E=JSON.parse(mxUtils.getTextContent(J.documentElement));if(null!=E&&0<E.length)for(var H=0;H<E.length;H++)null!=E[H].xml?f(null,null,0,0,0,0,E[H]):f(E[H].data,null,0,0,E[H].w,E[H].h,null,"fixed",E[H].title);m=!0}else if("mxfile"==J.documentElement.nodeName){for(var Q=J.documentElement.getElementsByTagName("diagram"),H=0;H<Q.length;H++){var E=mxUtils.getTextContent(Q[H]),M=b.stringToCells(Graph.decompress(E)),L=b.editor.graph.getBoundingBoxFromGeometry(M);f(null,null,0,
+0,0,0,{xml:E,w:L.width,h:L.height})}m=!0}}catch(R){}m||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(R){}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]));
+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||
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,B=null;e=function(b){"true"!=mxEvent.getSource(b).getAttribute("contentEditable")&&null!=B&&(B(),B=null,mxEvent.consume(b))};mxEvent.addListener(u,"mousedown",e);mxEvent.addListener(u,"pointerdown",e);mxEvent.addListener(u,"touchstart",e);var y=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 E=function(c){return function(d,e,l,m,g,k,p,q,t){null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t.name)||/(\.vs(x|sx?))($|\?)/i.test(t.name))?b.importVisio(t,mxUtils.bind(this,function(b){f(b,e,l,m,g,k,p,"fixed",mxEvent.isAltDown(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,t){null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t.name)||/(\.vs(x|sx?))($|\?)/i.test(t.name))?b.importVisio(t,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!=t&&!b.isOffline()&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(d,t.name)?b.parseFile(t,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,
450,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 H=document.createElement("input");H.setAttribute("multiple","multiple");H.setAttribute("type","file");mxEvent.addListener(H,"change",function(c){C=!1;
-b.importFiles(H.files,0,0,b.maxImageSize,function(b,f,d,e,l,m,g,k,p){null!=H.files&&(E(c)(b,f,d,e,l,m,g,k,p),H.type="",H.type="file",H.value="")});u.scrollTop=u.scrollHeight});H.style.display="none";document.body.appendChild(H);b.libDlgFileInputElt=H}q=mxUtils.button(mxResources.get("import"),function(){null!=B&&(B(),B=null);b.libDlgFileInputElt.click()});q.setAttribute("id","btnAddImage");q.className="geBtn";c.appendChild(q)}q=mxUtils.button(mxResources.get("addImages"),function(){null!=B&&(B(),
+(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,m,g,k,p){null!=G.files&&(D(c)(b,f,d,e,l,m,g,k,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!=B&&(B(),B=null);b.libDlgFileInputElt.click()});q.setAttribute("id","btnAddImage");q.className="geBtn";c.appendChild(q)}q=mxUtils.button(mxResources.get("addImages"),function(){null!=B&&(B(),
B=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!=B&&(B(),B=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";
@@ -10251,26 +10252,26 @@ m.decode(d,g);d=g.root.getChildAt(0).children||[];b.sidebar.createTooltip(f,d,Ma
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(da||b.sidebar.currentElt==f)b.sidebar.hideTooltip();else{var p=function(c){da&&b.sidebar.currentElt==f&&g(c,mxEvent.getClientX(e),mxEvent.getClientY(e));da=!1;d.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=f;da=!0;d.src="/images/aui-wait.gif";c.isExt?l(c,p,function(){x(mxResources.get("cantLoadPrev"));
da=!1;d.src="/images/icon-search.svg"}):m(c.url,p)}}function y(b,c,f){if(null!=W){for(var d=W.className.split(" "),e=0;e<d.length;e++)if(-1<d[e].indexOf("Active")){d.splice(e,1);break}W.className=d.join(" ")}null!=b?(W=b,W.className+=" "+c,Y=f,ga.className="geTempDlgCreateBtn"):(Y=W=null,ga.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function C(c,f){if(null!=Y){var d=function(c){t.isExternal?l(t,function(b){g(b,c)},k):t.url?mxUtils.get(TEMPLATE_PATH+"/"+t.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,t,f)},k=function(){x(mxResources.get("cannotLoad"));p()},p=function(){Y=t;ga.className="geTempDlgCreateBtn";f&&(ja.className="geTempDlgOpenBtn")},t=Y;Y=null;"boolean"!==typeof f&&(f=t.isExternal&&q);if(1==c)m(t.url,t);else if(f)ja.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",d();else{ga.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy";
-var n=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),n=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),d,n,function(b){var c=null!=b&&0<b.length;return c&&v?(d(b),!1):c},null,null,null,p,u?null:[]);b.showDialog(n.container,350,80,!0,!0);n.init()}}}function E(b){ga.innerHTML=mxUtils.htmlEntities(mxResources.get(R||b?"create":"copy"));b=b?"none":"";q&&(ja.style.display=b);for(var c=K.querySelectorAll(".geTempDlgLinkToDiagram"),
-f=0;f<c.length;f++)c[f].style.display=b}function H(c,f,d,e,l){l||(ia.innerHTML="",y(),na=c,pa=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");
+var n=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),n=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),d,n,function(b){var c=null!=b&&0<b.length;return c&&v?(d(b),!1):c},null,null,null,p,u?null:[]);b.showDialog(n.container,350,80,!0,!0);n.init()}}}function D(b){ga.innerHTML=mxUtils.htmlEntities(mxResources.get(R||b?"create":"copy"));b=b?"none":"";q&&(ja.style.display=b);for(var c=K.querySelectorAll(".geTempDlgLinkToDiagram"),
+f=0;f<c.length;f++)c[f].style.display=b}function G(c,f,d,e,l){l||(ia.innerHTML="",y(),na=c,pa=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);ia.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,t=c[g].imgUrl,n=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")));t||(t=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"),t=document.createElement("td"),v=document.createElement("img");v.src="/images/icon-search.svg";v.className="geTempDlgDiagramListPreviewBtn";v.setAttribute("title",mxResources.get("preview"));l||t.appendChild(v);q=document.createElement("span");q.className="geTempDlgDiagramTitle";q.innerHTML=k;t.appendChild(q);u.appendChild(t);
-t=document.createElement("td");t.innerHTML=n;u.appendChild(t);t=document.createElement("td");t.innerHTML=K;u.appendChild(t);m.appendChild(u);null==W&&(E(f),y(u,"geTempDlgDiagramsListGridActive",c[g]));(function(b,c,d){mxEvent.addListener(u,"click",function(){W!=c&&(E(f),y(c,"geTempDlgDiagramsListGridActive",b))});mxEvent.addListener(u,"dblclick",C);mxEvent.addListener(v,"click",function(f){B(b,c,d,f)})})(c[g],u,v)}else{var A=document.createElement("div");A.className="geTempDlgDiagramTile";A.setAttribute("title",
-q);null==W&&(E(f),y(A,"geTempDlgDiagramTileActive",c[g]));n=document.createElement("div");n.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var J=document.createElement("img");J.style.display="none";(function(b,c,f){J.onload=function(){c.className="geTempDlgDiagramTileImg";b.style.display=""};J.onerror=function(){this.src!=f?this.src=f:c.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(J,n,t?t.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):
-"");J.src=t;n.appendChild(J);A.appendChild(n);n=document.createElement("div");n.className="geTempDlgDiagramTileLbl";n.innerHTML=null!=k?k:"";A.appendChild(n);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(){W!=c&&(E(f),y(c,"geTempDlgDiagramTileActive",b))});mxEvent.addListener(A,"dblclick",C);mxEvent.addListener(v,
-"click",function(f){B(b,c,d,f)})})(c[g],A,v);ia.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),ia.appendChild(l),H(c,f,d,null,!0))}function D(b,c){ea.innerHTML="";y();for(var f=Math.floor(ea.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==W&&(E(!0),y(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);ea.appendChild(m);
-(function(b,c){mxEvent.addListener(m,"click",function(){W!=c&&(E(!0),y(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);ea.appendChild(m);mxEvent.addListener(m,"click",function(){function b(){var f=c.querySelector(".geTemplateDrawioCatLink");null!=f?f.click():setTimeout(b,200)}R=!0;var c=K.querySelector(".geTemplatesList");c.style.display="block";ha.style.width="";oa.style.display="";oa.value="";fa=null;b()});T.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(){N!=e&&(null!=N?(N.style.fontWeight="normal",N.style.textDecoration="none"):(V.style.display="none",ra.style.minHeight="100%"),N=e,N.style.fontWeight="bold",N.style.textDecoration="underline",ha.scrollTop=0,X&&(J=!0),U.innerHTML=d,Z.style.display="none",H(m?c[f]:l?qa[f][l]:b[f],m?!1:!0))})}var l=K.querySelector(".geTemplatesList");
+t=document.createElement("td");t.innerHTML=n;u.appendChild(t);t=document.createElement("td");t.innerHTML=K;u.appendChild(t);m.appendChild(u);null==W&&(D(f),y(u,"geTempDlgDiagramsListGridActive",c[g]));(function(b,c,d){mxEvent.addListener(u,"click",function(){W!=c&&(D(f),y(c,"geTempDlgDiagramsListGridActive",b))});mxEvent.addListener(u,"dblclick",C);mxEvent.addListener(v,"click",function(f){B(b,c,d,f)})})(c[g],u,v)}else{var A=document.createElement("div");A.className="geTempDlgDiagramTile";A.setAttribute("title",
+q);null==W&&(D(f),y(A,"geTempDlgDiagramTileActive",c[g]));n=document.createElement("div");n.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var J=document.createElement("img");J.style.display="none";(function(b,c,f){J.onload=function(){c.className="geTempDlgDiagramTileImg";b.style.display=""};J.onerror=function(){this.src!=f?this.src=f:c.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(J,n,t?t.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):
+"");J.src=t;n.appendChild(J);A.appendChild(n);n=document.createElement("div");n.className="geTempDlgDiagramTileLbl";n.innerHTML=null!=k?k:"";A.appendChild(n);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(){W!=c&&(D(f),y(c,"geTempDlgDiagramTileActive",b))});mxEvent.addListener(A,"dblclick",C);mxEvent.addListener(v,
+"click",function(f){B(b,c,d,f)})})(c[g],A,v);ia.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),ia.appendChild(l),G(c,f,d,null,!0))}function F(b,c){ea.innerHTML="";y();for(var f=Math.floor(ea.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==W&&(D(!0),y(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);ea.appendChild(m);
+(function(b,c){mxEvent.addListener(m,"click",function(){W!=c&&(D(!0),y(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);ea.appendChild(m);mxEvent.addListener(m,"click",function(){function b(){var f=c.querySelector(".geTemplateDrawioCatLink");null!=f?f.click():setTimeout(b,200)}R=!0;var c=K.querySelector(".geTemplatesList");c.style.display="block";ha.style.width="";oa.style.display="";oa.value="";fa=null;b()});T.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,m){mxEvent.addListener(e,"click",function(){N!=e&&(null!=N?(N.style.fontWeight="normal",N.style.textDecoration="none"):(V.style.display="none",ra.style.minHeight="100%"),N=e,N.style.fontWeight="bold",N.style.textDecoration="underline",ha.scrollTop=0,X&&(J=!0),U.innerHTML=d,Z.style.display="none",G(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"),t=document.createElement("div");t.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";t.style.padding="0";t.setAttribute("title",g.fullLbl);t.innerHTML=g.lbl;p=t;q.appendChild(t);var n=document.createElement("ul");n.className="geTempTreeNested";n.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);n.appendChild(u)}q.appendChild(n);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")})})(n,t)}else f.className="geTemplateCatLink geTemplateDrawioCatLink",f.setAttribute("title",g.fullLbl),f.innerHTML=g.lbl;l.appendChild(f);e(m,g.lblOnly,p)}}function G(){mxUtils.get(c,function(b){if(!ma){ma=!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"),
+0;c<f.length;c++)f[c].style.margin="0";b.style.visibility="hidden"},250);c.classList.toggle("geTempTreeCaret-down")})})(n,t)}else f.className="geTemplateCatLink geTemplateDrawioCatLink",f.setAttribute("title",g.fullLbl),f.innerHTML=g.lbl;l.appendChild(f);e(m,g.lblOnly,p)}}function H(){mxUtils.get(c,function(b){if(!ma){ma=!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=la[d];null==l&&(xa++,l=[],la[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(la,ta,Ba)}})}function I(b){n&&(ha.scrollTop=0,ia.innerHTML="",S.spin(ia),J=!1,X=!0,U.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),fa=null,n(wa,function(){x(mxResources.get("cannotLoad"));wa([])},b?null:k))}function L(b){if(""==b)null!=O&&(O.click(),O=null);else{if(null==TemplatesDialog.tagsList[c]){var f=
+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(la,ta,Ba)}})}function I(b){n&&(ha.scrollTop=0,ia.innerHTML="",S.spin(ia),J=!1,X=!0,U.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),fa=null,n(wa,function(){x(mxResources.get("cannotLoad"));wa([])},b?null:k))}function L(b){if(""==b)null!=O&&(O.click(),O=null);else{if(null==TemplatesDialog.tagsList[c]){var f=
{},d;for(d in la)for(var e=la[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<Ba&&null==f.__tagsList__){for(d in ta)for(e=ta[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]],t={};d=[];if(null!=q)for(k=0;k<q.length;k++)m=q[k],0==g==(null==e[m.url])&&(t[m.url]=!0,d.push(m));e=t;g++}0==d.length?U.innerHTML=mxResources.get("noResultsFor",[b]):H(d,!0)}}function M(b){if(fa!=b||aa!=ca)A(),ha.scrollTop=0,ia.innerHTML="",U.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(b)+'"',za=null,R?L(b):f&&(b?(S.spin(ia),J=!1,X=!0,f(b,wa,function(){x(mxResources.get("searchFailed"));wa([])},
+for(l=g=0;l<p.length;l++)if(0<p[l].length){var q=f[p[l]],t={};d=[];if(null!=q)for(k=0;k<q.length;k++)m=q[k],0==g==(null==e[m.url])&&(t[m.url]=!0,d.push(m));e=t;g++}0==d.length?U.innerHTML=mxResources.get("noResultsFor",[b]):G(d,!0)}}function M(b){if(fa!=b||aa!=ca)A(),ha.scrollTop=0,ia.innerHTML="",U.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(b)+'"',za=null,R?L(b):f&&(b?(S.spin(ia),J=!1,X=!0,f(b,wa,function(){x(mxResources.get("searchFailed"));wa([])},
aa?null:k)):I(aa)),fa=b,ca=aa}function Q(b){null!=za&&clearTimeout(za);13==b.keyCode?M(oa.value):za=setTimeout(function(){M(oa.value)},1E3)}var P='<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>'+
@@ -10278,9 +10279,9 @@ mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTemp
"geTemplateDlg";this.container=K;c=null!=c?c:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var X=!1,J=!1,N=null,O=null,W=null,Y=null,ka=!1,aa=!0,ba=!1,na=[],pa=null,fa,ca,R=!1,T=K.querySelector(".geTempDlgShowAllBtn"),ia=K.querySelector(".geTempDlgDiagramsTiles"),U=K.querySelector(".geTempDlgDiagramsListTitle"),Z=K.querySelector(".geTempDlgDiagramsListBtns"),ha=K.querySelector(".geTempDlgContent"),ra=K.querySelector(".geTempDlgDiagramsList"),V=K.querySelector(".geTempDlgNewDiagramCat"),
ea=K.querySelector(".geTempDlgNewDiagramCatList"),ga=K.querySelector(".geTempDlgCreateBtn"),ja=K.querySelector(".geTempDlgOpenBtn"),oa=K.querySelector(".geTempDlgSearchBox"),ua=K.querySelector(".geTempDlgErrMsg"),S=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();R=!1;K.querySelector(".geTemplatesList").style.display="none";ha.style.width=
"100%";V.style.display="";ra.style.minHeight="calc(100% - 280px)";oa.style.display=f?"":"none";oa.value="";fa=null;I(aa)});mxEvent.addListener(K.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){z(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(aa=!0,null==fa?I(aa):M(fa))});mxEvent.addListener(K.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){z(this,"geTempDlgMyDiagramsBtnImg",
-"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(aa=!1,null==fa?I(aa):M(fa))});mxEvent.addListener(K.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){z(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(ba=!0,H(na,!1,ba,pa))});mxEvent.addListener(K.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){z(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(ba=!1,H(na,
-!1,ba,pa))});var da=!1;mxEvent.addListener(T,"click",function(){ka?(V.style.height="280px",ea.style.height="190px",T.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),D(va)):(V.style.height="440px",ea.style.height="355px",T.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),D(va,!0));ka=!ka});var ma=!1,sa=!1,la={},qa={},ta={},va=[],xa=1,Ba=0;null!=p?p(function(b,c){ta=b;Ba=c;G()},G):G();mxUtils.get(g,function(b){if(!sa){sa=!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;D(va)}});var wa=function(b,c,f){Z.style.display="";S.stop();X=!1;if(J)J=!1;else if(c)ia.innerHTML=c;else{f=f||{};c=0;for(var d in f)c+=f[d].length;0==b.length&&0==c?ia.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):H(b,!1,ba,0==c?null:f)}};I(aa);var za=null;mxEvent.addListener(oa,"keyup",Q);
+"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(aa=!1,null==fa?I(aa):M(fa))});mxEvent.addListener(K.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){z(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(ba=!0,G(na,!1,ba,pa))});mxEvent.addListener(K.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){z(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(ba=!1,G(na,
+!1,ba,pa))});var da=!1;mxEvent.addListener(T,"click",function(){ka?(V.style.height="280px",ea.style.height="190px",T.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),F(va)):(V.style.height="440px",ea.style.height="355px",T.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),F(va,!0));ka=!ka});var ma=!1,sa=!1,la={},qa={},ta={},va=[],xa=1,Ba=0;null!=p?p(function(b,c){ta=b;Ba=c;H()},H):H();mxUtils.get(g,function(b){if(!sa){sa=!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;F(va)}});var wa=function(b,c,f){Z.style.display="";S.stop();X=!1;if(J)J=!1;else if(c)ia.innerHTML=c;else{f=f||{};c=0;for(var d in f)c+=f[d].length;0==b.length&&0==c?ia.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):G(b,!1,ba,0==c?null:f)}};I(aa);var za=null;mxEvent.addListener(oa,"keyup",Q);
mxEvent.addListener(oa,"search",Q);mxEvent.addListener(oa,"input",Q);mxEvent.addListener(ga,"click",function(b){C(!1,!1)});q&&mxEvent.addListener(ja,"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");
@@ -10425,8 +10426,8 @@ function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(th
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,t,n,y,u,v,B,A){try{l=null!=l?l:!0;m=null!=m?m:!0;t=null!=t?t:this.graph;n=null!=n?n:0;var x=k?null:t.background;x==mxConstants.NONE&&(x=null);null==x&&(x=d);null==x&&0==k&&(x=v?this.graph.defaultPageBackgroundColor:"#ffffff");
this.convertImages(t.getSvg(null,null,n,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=t.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=t.gridSize*v.gridSteps*g,F=t.getGraphBounds(),K=v.translate.x*B,z=v.translate.y*B,D=K+(F.x-K)/B-n,M=z+(F.y-z)/B-n,E=new Image;E.onload=function(){try{for(var b=
--Math.round(C-mxUtils.mod((K-D)*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(E,b/g,f/g);m()}catch(ya){null!=e&&e(ya)}};E.onerror=function(b){null!=e&&e(b)};E.src=A}else m()}catch(wa){null!=e&&e(wa)}});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(ea){null!=
+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=t.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=t.gridSize*v.gridSteps*g,E=t.getGraphBounds(),K=v.translate.x*B,z=v.translate.y*B,F=K+(E.x-K)/B-n,M=z+(E.y-z)/B-n,D=new Image;D.onload=function(){try{for(var b=
+-Math.round(C-mxUtils.mod((K-F)*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(ya){null!=e&&e(ya)}};D.onerror=function(b){null!=e&&e(b)};D.src=A}else m()}catch(wa){null!=e&&e(wa)}});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(ea){null!=
e&&e(ea)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(f,b),this.loadFonts(m)}catch(ga){null!=e&&e(ga)}}))}catch(ea){null!=e&&e(ea)}}),f,q)}catch(ha){null!=e&&e(ha)}};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,"+
@@ -10475,9 +10476,9 @@ mxEvent.addListener(l,"change",function(){var b=mxUtils.htmlEntities(l.value);d(
(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&&(n=mxUtils.button("-",mxUtils.bind(q,function(b){d(c,"",p,p.index);mxEvent.consume(b)})),n.style.height="16px",n.style.width="25px",n.style["float"]="right",n.className="geColorBtn",B.appendChild(n));v.appendChild(B);return v}var q=this,t=this.editorUi.editor.graph,n=[];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(la){}}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,D=[],M=[],v=0;v<K.length;v++){var E=f.style[K[v]];M.push(c[K[v]].subDefVal);D.push(null!=E?E.split(","):[])}u.dependentPropsDefVal=M;u.dependentPropsVals=D}y.appendChild(p(F,z,u,x,C));x=!x}}for(v=0;v<n.length;v++)for(u=n[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=
+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,F=[],M=[],v=0;v<K.length;v++){var D=f.style[K[v]];M.push(c[K[v]].subDefVal);F.push(null!=D?D.split(","):[])}u.dependentPropsDefVal=M;u.dependentPropsVals=F}y.appendChild(p(E,z,u,x,C));x=!x}}for(v=0;v<n.length;v++)for(u=n[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(" "),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!=g[b]&&(null!=this.format.currentScheme&&null!=g[this.format.currentScheme]&&(g[this.format.currentScheme].style.background=
"transparent"),this.format.currentScheme=b,t(this.defaultColorSchemes[this.format.currentScheme]),g[this.format.currentScheme].style.background="#84d7ff")}),t=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])?
@@ -10514,13 +10515,13 @@ m.selectionModel.addListener(mxEvent.CHANGE,n);m.model.addListener(mxEvent.CHANG
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 y=Graph.prototype.isFastZoomEnabled;
Graph.prototype.isFastZoomEnabled=function(){return y.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(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}};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 E=Graph.prototype.getSvg;Graph.prototype.getSvg=function(b,c,f,d,e,l,m,g,k,p,q,t,n,y){var u=null,v=null,B=null;t||null==this.themes||"darkTheme"!=this.defaultThemeName||(u=this.stylesheet,v=this.defaultForegroundColor,B=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.defaultForegroundColor="darkTheme"==this.defaultThemeName?"#000000":"#f0f0f0",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var A=E.apply(this,
-arguments),x=this.getCustomFonts();if(q&&0<x.length){var C=A.ownerDocument,F=null!=C.createElementNS?C.createElementNS(mxConstants.NS_SVG,"style"):C.createElement("style");null!=C.setAttributeNS?F.setAttributeNS("type","text/css"):F.setAttribute("type","text/css");for(var z="",D="",M=0;M<x.length;M++){var I=x[M].name,K=x[M].url;Graph.isCssFontUrl(K)?z+="@import url("+K+");\n":D+='@font-face {\nfont-family: "'+I+'";\nsrc: url("'+K+'");\n}\n'}F.appendChild(C.createTextNode(z+D));A.getElementsByTagName("defs")[0].appendChild(F)}null!=
-u&&(this.defaultPageBackgroundColor=B,this.defaultForegroundColor=v,this.stylesheet=u,this.refresh());return A};var H=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var b=H.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 D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){D.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||
+var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(b,c,f,d,e,l,m,g,k,p,q,t,n,y){var u=null,v=null,B=null;t||null==this.themes||"darkTheme"!=this.defaultThemeName||(u=this.stylesheet,v=this.defaultForegroundColor,B=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.defaultForegroundColor="darkTheme"==this.defaultThemeName?"#000000":"#f0f0f0",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var A=D.apply(this,
+arguments),x=this.getCustomFonts();if(q&&0<x.length){var C=A.ownerDocument,E=null!=C.createElementNS?C.createElementNS(mxConstants.NS_SVG,"style"):C.createElement("style");null!=C.setAttributeNS?E.setAttributeNS("type","text/css"):E.setAttribute("type","text/css");for(var z="",F="",M=0;M<x.length;M++){var I=x[M].name,K=x[M].url;Graph.isCssFontUrl(K)?z+="@import url("+K+");\n":F+='@font-face {\nfont-family: "'+I+'";\nsrc: url("'+K+'");\n}\n'}E.appendChild(C.createTextNode(z+F));A.getElementsByTagName("defs")[0].appendChild(E)}null!=
+u&&(this.defaultPageBackgroundColor=B,this.defaultForegroundColor=v,this.stylesheet=u,this.refresh());return A};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 F=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){F.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 G=Graph.prototype.loadStylesheet;
-Graph.prototype.loadStylesheet=function(){G.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.webKitForceRepaintNode.style.cssText="position:absolute;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};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 H=Graph.prototype.loadStylesheet;
+Graph.prototype.loadStylesheet=function(){H.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 t=this.getCellsForAction(p.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(t),
@@ -10554,30 +10555,30 @@ mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilR
[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 L=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 L.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(n.value))));n.value=Math.max(1,Math.min(g,Math.min(parseInt(y.value),parseInt(n.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 t=c.getGraphBounds(),n=0,y=0,u=L.get(),v=1/c.pageScale,x=A.checked;if(x)var v=parseInt(G.value),C=parseInt(Q.value),v=Math.min(u.height*C/(t.height/c.view.scale),u.width*v/(t.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?(t=c.getPageLayout(),n-=t.x*u.width,y-=t.y*u.height):x=!0;if(null==f){f=PrintDialog.createPrintPreview(c,v,u,0,n,y,x);f.pageSelector=!1;f.mathEnabled=!1;n=b.getCurrentFile();null!=n&&(f.title=n.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">'),
+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 t=c.getGraphBounds(),n=0,y=0,u=L.get(),v=1/c.pageScale,x=A.checked;if(x)var v=parseInt(H.value),C=parseInt(Q.value),v=Math.min(u.height*C/(t.height/c.view.scale),u.width*v/(t.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?(t=c.getPageLayout(),n-=t.x*u.width,y-=t.y*u.height):x=!0;if(null==f){f=PrintDialog.createPrintPreview(c,v,u,0,n,y,x);f.pageSelector=!1;f.mathEnabled=!1;n=b.getCurrentFile();null!=n&&(f.title=n.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,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}}n=null;y=e.enableFlowAnimation;e.enableFlowAnimation=
!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(n=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());f.open(null,null,l,!0);e.enableFlowAnimation=y;null!=n&&(e.stylesheet=n,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,n,y,l,!0);l=c.getCustomFonts();if(null!=f.wnd)for(n=0;n<l.length;n++)y=l[n].name,x=l[n].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=n.value,g=y.value,p=!q.checked,t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,m,g,A.checked,G.value,Q.value,parseInt(B.value)/100,parseInt(K.value)/100,L.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,
+e.stylesheet=e.getDefaultStylesheet(),e.refresh());var m=n.value,g=y.value,p=!q.checked,t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,m,g,A.checked,H.value,Q.value,parseInt(B.value)/100,parseInt(K.value)/100,L.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,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,m.extFonts=x.viewState.extFonts);m.background=C;m.backgroundImage=null!=E?new mxImage(E.src,E.width,E.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)}t=f(m,t,v!=p);m!=e&&m.container.parentNode.removeChild(m.container)}}else t=f(e);null==t?b.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(p=t.wnd.document,c&&(t.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),t.closeDocument(),!t.mathEnabled&&c&&PrintDialog.printPreview(t));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 t=q.cloneNode(!0);q.setAttribute("checked","checked");t.setAttribute("value","range");p.appendChild(t);m=document.createElement("span");mxUtils.write(m,mxResources.get("pages")+":");p.appendChild(m);var n=document.createElement("input");n.style.cssText="margin:0 8px 0 8px;";n.setAttribute("value","1");n.setAttribute("type",
"number");n.setAttribute("min","1");n.style.width="50px";p.appendChild(n);m=document.createElement("span");mxUtils.write(m,mxResources.get("to"));p.appendChild(m);var y=n.cloneNode(!0);p.appendChild(y);mxEvent.addListener(n,"focus",function(){t.checked=!0});mxEvent.addListener(y,"focus",function(){t.checked=!0});mxEvent.addListener(n,"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;n.value=k;y.value=k;break}n.setAttribute("max",g);y.setAttribute("max",g);b.isPagesEnabled()?1<g&&(l.appendChild(p),t.checked=!0):t.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"),D=z.cloneNode(!0),M=z.cloneNode(!0),E=z.cloneNode(!0),I=z.cloneNode(!0),H=z.cloneNode(!0);z.style.textAlign="right";E.style.textAlign="right";mxUtils.write(z,mxResources.get("fitTo"));var G=document.createElement("input");G.style.cssText="margin:0 8px 0 8px;";G.setAttribute("value","1");G.setAttribute("min","1");G.setAttribute("type","number");G.style.width="40px";D.appendChild(G);
-m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsAcross"));M.appendChild(m);mxUtils.write(E,mxResources.get("fitToBy"));var Q=G.cloneNode(!0);I.appendChild(Q);mxEvent.addListener(G,"focus",function(){A.checked=!0});mxEvent.addListener(Q,"focus",function(){A.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));H.appendChild(m);C.appendChild(z);C.appendChild(D);C.appendChild(M);F.appendChild(E);F.appendChild(I);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 L=PageSetupDialog.addPageFormatPanel(m,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(m);m=document.createElement("span");mxUtils.write(m,
+var x=document.createElement("tbody"),C=document.createElement("tr"),E=C.cloneNode(!0),z=document.createElement("td"),F=z.cloneNode(!0),M=z.cloneNode(!0),D=z.cloneNode(!0),I=z.cloneNode(!0),G=z.cloneNode(!0);z.style.textAlign="right";D.style.textAlign="right";mxUtils.write(z,mxResources.get("fitTo"));var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";H.setAttribute("value","1");H.setAttribute("min","1");H.setAttribute("type","number");H.style.width="40px";F.appendChild(H);
+m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsAcross"));M.appendChild(m);mxUtils.write(D,mxResources.get("fitToBy"));var Q=H.cloneNode(!0);I.appendChild(Q);mxEvent.addListener(H,"focus",function(){A.checked=!0});mxEvent.addListener(Q,"focus",function(){A.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));G.appendChild(m);C.appendChild(z);C.appendChild(F);C.appendChild(M);E.appendChild(D);E.appendChild(I);E.appendChild(G);
+x.appendChild(C);x.appendChild(E);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 L=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!=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 Q=document.createElement("canvas"),P=new Image;P.onload=function(){try{Q.getContext("2d").drawImage(P,
0,0);var b=Q.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=b&&6<b.length}catch(X){}};P.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.5.8";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.5.9";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":
@@ -10628,17 +10629,17 @@ null;this.fileNode=b;this.pages=[];for(var d=0;d<c.length;d++)null==c[d].getAttr
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,B){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,B);this.editor.graph.pageVisible=d;return l}catch(P){this.handleError(P)}}));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(I){this.handleError(I)}};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&&
+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,B);this.editor.graph.pageVisible=d;return l}catch(P){this.handleError(P)}}));else{var p=null,t=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 q=this.editor.graph.background;if(n||q==mxConstants.NONE)q=null;var u=this.editor.graph.getSvg(q,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();t(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();
+t(b)}),e)}}catch(I){this.handleError(I)}};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,B=0;B<z.length;B++)e.setAttributeForCell(n,z[B].nodeName,0<z[B].nodeValue.length?z[B].nodeValue:null)}}catch(I){null!=window.console&&console.log("Error in value for "+n.id+": "+I)}try{var y=b.getAttribute("style");null!=y&&e.model.setStyle(n,y)}catch(I){null!=
-window.console&&console.log("Error in style for "+n.id+": "+I)}try{var C=b.getAttribute("icon");if(null!=C){var E=0<C.length?JSON.parse(C):null;null!=E&&E.append||e.removeCellOverlays(n);null!=E&&e.addCellOverlay(n,c(E))}}catch(I){null!=window.console&&console.log("Error in icon for "+n.id+": "+I)}try{var H=b.getAttribute("geometry");if(null!=H){var H=JSON.parse(H),D=e.getCellGeometry(n);if(null!=D){D=D.clone();for(key in H){var F=parseFloat(H[key]);"dx"==key?D.x+=F:"dy"==key?D.y+=F:"dw"==key?D.width+=
-F:"dh"==key?D.height+=F:D[key]=parseFloat(H[key])}e.model.setGeometry(n,D)}}}catch(I){null!=window.console&&console.log("Error in icon for "+n.id+": "+I)}}}else if("model"==b.nodeName){for(var G=b.firstChild;null!=G&&G.nodeType!=mxConstants.NODETYPE_ELEMENT;)G=G.nextSibling;null!=G&&(new mxCodec(b.firstChild)).decode(G,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")||
+window.console&&console.log("Error in style for "+n.id+": "+I)}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(I){null!=window.console&&console.log("Error in icon for "+n.id+": "+I)}try{var G=b.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),F=e.getCellGeometry(n);if(null!=F){F=F.clone();for(key in G){var E=parseFloat(G[key]);"dx"==key?F.x+=E:"dy"==key?F.y+=E:"dw"==key?F.width+=
+E:"dh"==key?F.height+=E:F[key]=parseFloat(G[key])}e.model.setGeometry(n,F)}}}catch(I){null!=window.console&&console.log("Error in icon for "+n.id+": "+I)}}}else if("model"==b.nodeName){for(var H=b.firstChild;null!=H&&H.nodeType!=mxConstants.NODETYPE_ELEMENT;)H=H.nextSibling;null!=H&&(new mxCodec(b.firstChild)).decode(H,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};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=
@@ -10656,108 +10657,109 @@ this.libraryLoaded(b,d,f.documentElement.getAttribute("title"),c)}else throw{mes
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 B=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!=B?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f();mxEvent.consume(c)}}));
-if(b.isEditable()){var y=this.editor.graph,C=null,E=mxUtils.bind(this,function(f){this.showLibraryDialog(b.getTitle(),g,c,b,b.getMode());mxEvent.consume(f)}),H=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=
+if(b.isEditable()){var y=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=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==B&&(B=n.cloneNode(!1),B.setAttribute("src",Editor.saveImage),B.setAttribute("title",mxResources.get("save")),p.insertBefore(B,p.firstChild),mxEvent.addListener(B,"click",mxUtils.bind(this,function(f){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
-B||b.isModified()||(k.style.paddingRight=18*p.childNodes.length+"px",B.parentNode.removeChild(B),B=null)});mxEvent.consume(f)})),k.style.paddingRight=18*p.childNodes.length+"px")}),D=mxUtils.bind(this,function(b,f,d,e){b=y.cloneCells(mxUtils.sortCells(y.model.getTopmostCells(b)));for(var m=0;m<b.length;m++){var k=y.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);H(d);null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null)}),F=mxUtils.bind(this,function(b){if(y.isSelectionEmpty())y.getRubberband().isActive()?(y.getRubberband().execute(b),y.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=y.getSelectionCells(),f=y.view.getBounds(c),d=y.view.scale;f.x/=d;f.y/=d;f.width/=d;f.height/=d;f.x-=y.view.translate.x;
-f.y-=y.view.translate.y;D(c,f)}mxEvent.consume(b)});mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(b){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler.first&&(y.graphHandler.suspend(),null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="hidden"),g.style.backgroundColor="#f1f3f4",g.style.cursor="copy",y.panningManager.stop(),y.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler&&
-(g.style.backgroundColor="",g.style.cursor="default",this.sidebar.showTooltips=!0,y.panningManager.stop(),y.graphHandler.reset(),y.isMouseDown=!1,y.autoScroll=!0,F(b),mxEvent.consume(b))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(b){y.isMouseDown&&null!=y.graphHandler.first&&(y.graphHandler.resume(),null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="visible"),g.style.backgroundColor="",g.style.cursor="",y.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(g,
+B||b.isModified()||(k.style.paddingRight=18*p.childNodes.length+"px",B.parentNode.removeChild(B),B=null)});mxEvent.consume(f)})),k.style.paddingRight=18*p.childNodes.length+"px")}),F=mxUtils.bind(this,function(b,f,d,e){b=y.cloneCells(mxUtils.sortCells(y.model.getTopmostCells(b)));for(var m=0;m<b.length;m++){var k=y.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);G(d);null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null)}),E=mxUtils.bind(this,function(b){if(y.isSelectionEmpty())y.getRubberband().isActive()?(y.getRubberband().execute(b),y.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=y.getSelectionCells(),f=y.view.getBounds(c),d=y.view.scale;f.x/=d;f.y/=d;f.width/=d;f.height/=d;f.x-=y.view.translate.x;
+f.y-=y.view.translate.y;F(c,f)}mxEvent.consume(b)});mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(b){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler.first&&(y.graphHandler.suspend(),null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="hidden"),g.style.backgroundColor="#f1f3f4",g.style.cursor="copy",y.panningManager.stop(),y.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){y.isMouseDown&&null!=y.panningManager&&null!=y.graphHandler&&
+(g.style.backgroundColor="",g.style.cursor="default",this.sidebar.showTooltips=!0,y.panningManager.stop(),y.graphHandler.reset(),y.isMouseDown=!1,y.autoScroll=!0,E(b),mxEvent.consume(b))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(b){y.isMouseDown&&null!=y.graphHandler.first&&(y.graphHandler.resume(),null!=y.graphHandler.hint&&(y.graphHandler.hint.style.visibility="visible"),g.style.backgroundColor="",g.style.cursor="",y.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,D(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,v=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);H(b);this.spinner.stop();u=!0}catch(ca){}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);D(n,new mxRectangle(0,0,q.width,q.height),b)}u=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+this.convertDataUri(f),f=[new mxCell("",new mxGeometry(0,0,p,n),f)],f[0].vertex=!0,F(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,v=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);G(b);this.spinner.stop();u=!0}catch(ca){}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);F(n,new mxRectangle(0,0,q.width,q.height),b)}u=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}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){v(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?v(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):v(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",E);mxEvent.addListener(g,"dblclick",function(b){mxEvent.getSource(b)==
-g&&E(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")))})):v(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",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=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
-Editor.darkColor,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",
-endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(b,c,d,e,g){b=new ImageDialog(this,b,c,d,e,g);this.showDialog(b.container,
-Graph.fileSupport?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,
+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=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultForegroundColor="#f0f0f0",Graph.prototype.defaultPageBorderColor=
+"#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,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",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(b,
+c,d,e,g){b=new ImageDialog(this,b,c,d,e,g);this.showDialog(b.container,Graph.fileSupport?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?" ("+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+">");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,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,"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"==
-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,450,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(E){this.handleError(E)}}))}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,420,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=
-"#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var c=f.getBoundingClientRect();
-this.tagsDialog.style.left=c.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=c.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(b)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(){var b=this.editor.graph.getAllTags();f.style.display=0<b.length?"":"none"}));c.apply(this,arguments)}this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",
-mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var d=b(mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",c);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)c.apply(this);else{this.exportDialog=document.createElement("div");var f=d.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,
-"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=f.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=f.zIndex;var 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":
-"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,420,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,B,y,C){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,B);e&&this.editor.graph.addSvgShadow(m);var p=this.getBaseFilename()+(g?".drawio":"")+".svg";C=null!=C?C:mxUtils.bind(this,function(b){this.isLocalFileSave()||
-b.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});var 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));C(Graph.xmlDeclaration+"\n"+(g?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b))});this.editor.graph.mathEnabled&&this.editor.addMathCss(m);
-var t=mxUtils.bind(this,function(b){k?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(b,q,this.thumbImageCache)):q(b)});y?this.embedFonts(m,t):(this.editor.addFontCss(m),t(m))}catch(L){this.handleError(L)}};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");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,B){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):"";B(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.DRAWIO_VIEWER_URL?window.DRAWIO_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),B=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");var y=document.createElement("input");y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.style.marginRight="12px";y.value="100%";f.appendChild(y);var C=this.addCheckbox(f,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=
-E=this.addCheckbox(f,mxResources.get("allPages"),g,!g),H=this.addCheckbox(f,mxResources.get("layers"),!0),D=this.addCheckbox(f,mxResources.get("tags"),!0),F=this.addCheckbox(f,mxResources.get("lightbox"),!0),G=this.addEditButton(f,F),I=G.getEditInput();I.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");I.checked&&F.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled",
-"disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(m.checked?d:null,B.checked,y.value,n.getTarget(),n.getColor(),C.checked,E.checked,H.checked,D.checked,F.checked,G.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,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 E=null;if(null==m||m.constructor!=window.DriveFile||c)E=this.addCheckbox(f,mxResources.get("allPages"),d,!d);var H=this.addCheckbox(f,
-mxResources.get("lightbox"),!0,null,null,!k),D=this.addEditButton(f,H),F=D.getEditInput();k&&(F.style.marginLeft=H.style.marginLeft,H.style.display="none",b-=20);var G=this.addCheckbox(f,mxResources.get("layers"),!0);G.style.marginLeft=F.style.marginLeft;G.style.marginTop="8px";var I=this.addCheckbox(f,mxResources.get("tags"),!0);I.style.marginLeft=F.style.marginLeft;I.style.marginBottom="16px";I.style.marginTop="16px";mxEvent.addListener(H,"change",function(){H.checked?(G.removeAttribute("disabled"),
-F.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"));F.checked&&H.checked?D.getEditSelect().removeAttribute("disabled"):D.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,function(){g(C.getTarget(),C.getColor(),null==E?!0:E.checked,H.checked,D.getLink(),G.checked,null!=q?q.value:null,null!=t?t.value:null,I.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 p=this.addCheckbox(f,
-mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=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(!p.checked,null!=n?n.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()),D=document.createElement("input");D.style.marginTop="16px";D.style.marginRight="8px";D.style.marginLeft="24px";D.setAttribute("disabled","disabled");D.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 G=document.createElement("option");mxUtils.write(G,mxResources.get(b[p]));G.setAttribute("value",
-b[p]);F.appendChild(G)}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(D),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),m+=30,mxEvent.addListener(u,"change",function(){u.checked?D.removeAttribute("disabled"):D.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",D.setAttribute("checked","checked"),D.defaultChecked=!0,mxEvent.addListener(u,"change",function(){F.value=u.checked?"selectionOnly":"diagram"}));var I=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=v),L=null;Editor.isDarkMode()&&(L=this.addCheckbox(f,mxResources.get("dark"),!0),m+=26);var M=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible),Q=document.createElement("input");Q.style.marginTop="16px";Q.style.marginRight="8px";
-Q.setAttribute("type","checkbox");var P=document.createElement("input");P.style.marginTop="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||Q.setAttribute("disabled","disabled");c&&(f.appendChild(Q),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),f.appendChild(P),mxUtils.write(f,mxResources.get("embedFonts")),mxUtils.br(f),m+=60);var K=null;if("png"==v||"jpeg"==v)K=this.addCheckbox(f,mxResources.get("grid"),!1,this.isOffline()||
-!this.canvasSupported,!1,!0),m+=30;var X=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=v);X.style.marginBottom="16px";var J=document.createElement("select");J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginRight="10px";J.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));J.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,
-mxResources.get("openInNewWindow"));J.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));J.appendChild(c);"svg"==v&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(J),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,I.checked,!u.checked,M.checked,X.checked,Q.checked,t.value,D.checked,!1,J.value,
-null!=K?K.checked:null,null!=L?L.checked:null,F.value,P.checked)}),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),p=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible&&e,!e),n=this.addCheckbox(f,d),q=this.addCheckbox(f,mxResources.get("lightbox"),!0),y=this.addEditButton(f,q),C=y.getEditInput(),E=1<l.model.getChildCount(l.model.getRoot()),H=this.addCheckbox(f,mxResources.get("layers"),E,!E);H.style.marginLeft=C.style.marginLeft;H.style.marginBottom="12px";H.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?
-(E&&H.removeAttribute("disabled"),C.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"));C.checked&&q.checked?y.getEditSelect().removeAttribute("disabled"):y.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,function(){b(k.checked,p.checked,n.checked,q.checked,y.getLink(),H.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=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&&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('"+
+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)})):null!=l&&null!=l.ownerEmail&&(k=mxResources.get("contactOwner"),n+=mxUtils.htmlEntities(" ("+k+": "+l.ownerEmail+")"),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(l.ownerEmail))}));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,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,"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"==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,450,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,420,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="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&
+(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var c=f.getBoundingClientRect();this.tagsDialog.style.left=c.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=c.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(b)}),
+Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.editor.graph.getAllTags();f.style.display=0<b.length?"":"none"}));c.apply(this,arguments)}this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&
+(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),
+this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var d=b(mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",c);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)c.apply(this);
+else{this.exportDialog=document.createElement("div");var f=d.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color=
+"#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=f.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=f.zIndex;var 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":"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,420,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,B,y,C){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,B);e&&this.editor.graph.addSvgShadow(m);var p=
+this.getBaseFilename()+(g?".drawio":"")+".svg";C=null!=C?C:mxUtils.bind(this,function(b){this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});var 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));C(Graph.xmlDeclaration+"\n"+(g?Graph.svgFileComment+
+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b))});this.editor.graph.mathEnabled&&this.editor.addMathCss(m);var t=mxUtils.bind(this,function(b){k?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(b,q,this.thumbImageCache)):q(b)});y?this.embedFonts(m,t):(this.editor.addFontCss(m),t(m))}catch(L){this.handleError(L)}};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");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,B){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):"";B(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.DRAWIO_VIEWER_URL?window.DRAWIO_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),B=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,":");var y=document.createElement("input");y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft=
+"4px";y.style.marginRight="12px";y.value="100%";f.appendChild(y);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),F=this.addCheckbox(f,mxResources.get("tags"),!0),E=this.addCheckbox(f,mxResources.get("lightbox"),!0),H=this.addEditButton(f,E),I=H.getEditInput();I.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?I.removeAttribute("disabled"):
+I.setAttribute("disabled","disabled");I.checked&&E.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(m.checked?d:null,B.checked,y.value,n.getTarget(),n.getColor(),C.checked,D.checked,G.checked,F.checked,E.checked,H.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,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 G=this.addCheckbox(f,mxResources.get("lightbox"),!0,null,null,!k),F=this.addEditButton(f,G),E=F.getEditInput();k&&(E.style.marginLeft=G.style.marginLeft,G.style.display="none",b-=20);var H=this.addCheckbox(f,mxResources.get("layers"),!0);H.style.marginLeft=E.style.marginLeft;H.style.marginTop="8px";var I=this.addCheckbox(f,mxResources.get("tags"),!0);I.style.marginLeft=E.style.marginLeft;I.style.marginBottom=
+"16px";I.style.marginTop="16px";mxEvent.addListener(G,"change",function(){G.checked?(H.removeAttribute("disabled"),E.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"));E.checked&&G.checked?F.getEditSelect().removeAttribute("disabled"):F.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,F.getLink(),H.checked,null!=q?q.value:null,
+null!=t?t.value:null,I.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 p=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=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(!p.checked,null!=n?n.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()),F=document.createElement("input");F.style.marginTop="16px";F.style.marginRight="8px";F.style.marginLeft="24px";F.setAttribute("disabled","disabled");F.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 H=
+document.createElement("option");mxUtils.write(H,mxResources.get(b[p]));H.setAttribute("value",b[p]);E.appendChild(H)}x?(mxUtils.write(f,mxResources.get("size")+":"),f.appendChild(E),mxUtils.br(f),m+=26,mxEvent.addListener(E,"change",function(){"selectionOnly"==E.value&&(u.checked=!0)})):k&&(f.appendChild(F),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),m+=30,mxEvent.addListener(u,"change",function(){u.checked?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}));l.isSelectionEmpty()?
+x&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",m-=30):(E.value="diagram",F.setAttribute("checked","checked"),F.defaultChecked=!0,mxEvent.addListener(u,"change",function(){E.value=u.checked?"selectionOnly":"diagram"}));var I=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=v),L=null;Editor.isDarkMode()&&(L=this.addCheckbox(f,mxResources.get("dark"),!0),m+=26);var M=this.addCheckbox(f,mxResources.get("shadow"),
+l.shadowVisible),Q=document.createElement("input");Q.style.marginTop="16px";Q.style.marginRight="8px";Q.setAttribute("type","checkbox");var P=document.createElement("input");P.style.marginTop="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||Q.setAttribute("disabled","disabled");c&&(f.appendChild(Q),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),f.appendChild(P),mxUtils.write(f,mxResources.get("embedFonts")),mxUtils.br(f),m+=
+60);var K=null;if("png"==v||"jpeg"==v)K=this.addCheckbox(f,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),m+=30;var X=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=v);X.style.marginBottom="16px";var J=document.createElement("select");J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginRight="10px";J.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));
+J.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("openInNewWindow"));J.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));J.appendChild(c);"svg"==v&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(J),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,I.checked,!u.checked,M.checked,X.checked,Q.checked,t.value,F.checked,!1,J.value,null!=K?K.checked:null,null!=L?L.checked:null,E.value,P.checked)}),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),p=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible&&e,!e),n=this.addCheckbox(f,d),q=this.addCheckbox(f,mxResources.get("lightbox"),!0),y=this.addEditButton(f,q),C=y.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?y.getEditSelect().removeAttribute("disabled"):y.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,function(){b(k.checked,p.checked,n.checked,q.checked,
+y.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,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=
+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&&
+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=
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!=
@@ -10767,15 +10769,15 @@ arguments)};document.body.appendChild(f.container);f.model.setRoot(p.root)}this.
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,B,y){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||B,null,y,"diagram");(c.shadowVisible||B)&&c.addSvgShadow(k);null!=b&&k.setAttribute("content",b);null!=d&&k.setAttribute("resource",d);var f=mxUtils.bind(this,function(b){b=(e?"":Graph.xmlDeclaration+
"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(b);null!=g&&g(b);return b});c.mathEnabled&&this.editor.addMathCss(k);if(null!=g)this.embedFonts(k,mxUtils.bind(this,function(b){v?this.editor.convertImages(b,mxUtils.bind(this,function(b){f(b)})):f(b)}));else return f(k)};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,B,y){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(H){this.handleError(H)}}),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,B,y)}catch(E){this.spinner.stop(),this.handleError(E)}}};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();
+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,n,A,B,y)}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,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 E=q[u].getAttribute("id");q[u].removeAttribute("id");var H=this.updatePageRoot(new DiagramPage(q[u]));b[E]=q[u].getAttribute("id");var D=this.pages.length;null==H.getName()&&H.setName(mxResources.get("pageWithNumber",
-[D+1]));l.model.execute(new ChangePage(this,H,H,D,!0));k.push(H)}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,
+""!=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 G=this.updatePageRoot(new DiagramPage(q[u]));b[D]=q[u].getAttribute("id");var F=this.pages.length;null==G.getName()&&G.setName(mxResources.get("pageWithNumber",
+[F+1]));l.model.execute(new ChangePage(this,G,G,F,!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]);n&&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 f=b[c.substring(c.indexOf(",")+1)];c=null!=f?"data:page/id,"+f:null}else if("data:action/json,"==c.substring(0,17))try{var d=JSON.parse(c.substring(17));if(null!=d.actions){for(var e=0;e<d.actions.length;e++){var l=d.actions[e];if(null!=l.open&&Graph.isPageLink(l.open)){var g=l.open.substring(l.open.indexOf(",")+1),f=b[g];null!=f?l.open="data:page/id,"+f:null==this.getPageById(g)&&delete l.open}}c=
"data:action/json,"+JSON.stringify(d)}}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(B){}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 p=new XMLHttpRequest;p.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(e)?"?stencil=1":""));
-p.responseType="blob";this.addRemoteServiceSecurityCheck(p);null!=g&&p.setRequestHeader("x-convert-custom",g);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 f=new FileReader;f.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(E){d({message:mxResources.get("errorLoadingFile")})}});f.readAsText(b)}else this.doImportVisio(b,c,d,e)}catch(C){d(C)}else try{""==p.responseType||"text"==p.responseType?
+p.responseType="blob";this.addRemoteServiceSecurityCheck(p);null!=g&&p.setRequestHeader("x-convert-custom",g);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 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{""==p.responseType||"text"==p.responseType?
d({message:p.responseText}):(f=new FileReader,f.onload=function(){d({message:JSON.parse(f.result).Message})},f.readAsText(p.response))}catch(C){d({})}});p.send(f)}else try{this.doImportVisio(b,c,d,e)}catch(B){d(B)}}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,
@@ -10785,7 +10787,7 @@ c.startOnLoad=!1,mermaid.mermaidAPI.initialize(c),mermaid.mermaidAPI.render("geM
l=parseFloat(k[2]),g=parseFloat(k[3])}catch(B){l=l||100,g=g||100}d(f.convertDataUri(Editor.createSvgDataUri(b)),l,g)}else e({message:mxResources.get("invalidInput")})}catch(B){e(B)}})}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)))),p=mxUtils.parseXml(m).getElementsByTagName("svg");
-0<p.length&&(b=parseFloat(p[0].getAttribute("width")),l=parseFloat(p[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=
+0<p.length&&(b=parseFloat(p[0].getAttribute("width")),l=parseFloat(p[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,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," ")],{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(y){}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);
@@ -10803,23 +10805,23 @@ d,e,A,null,null!=B?mxEvent.isControlDown(B):null);null!=v&&v(c)});"image"==c.sub
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!=B?mxEvent.isControlDown(B):null));f||null==v||v(l);return l};EditorUi.prototype.importFiles=function(b,c,d,e,g,k,n,v,x,A,z,B,y){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,B,y)}catch(pa){return this.handleError(pa),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)}}),C=0;C<q;C++)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(","),y=decodeURIComponent(escape(atob(q.substring(t+1)))),u=mxUtils.parseXml(y),y=u.getElementsByTagName("svg");if(0<y.length){var y=y[0],v=B?null:y.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,
+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=[];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)}}),C=0;C<q;C++)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(","),y=decodeURIComponent(escape(atob(q.substring(t+1)))),u=mxUtils.parseXml(y),y=u.getElementsByTagName("svg");if(0<y.length){var y=y[0],v=B?null:y.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!=u){var b=u.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,B=l.getAttribute("viewBox");if(null==B||0==B.length)l.setAttribute("viewBox","0 0 "+n+" "+y);else if(isNaN(n)||isNaN(y)){var v=B.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 C=new Image;C.onload=mxUtils.bind(this,function(){n=Math.max(1,C.width);y=Math.max(1,C.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]])});C.src=Editor.createSvgDataUri(mxUtils.getXml(l))}return A}}}catch(ea){}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{y=!1;if("image/png"==k.type){var C=B?null:this.extractGraphModelFromPng(b.target.result);if(null!=C&&0<C.length){var x=new Image;x.src=b.target.result;F(f,mxUtils.bind(this,function(){return g(C,"text/xml",c+f*p,d+f*p,x.width,x.height,k.name)}));y=!0}}y||(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,
+var E=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*E)),Math.max(1,Math.round(y*E)),k.name);if(isNaN(n)||isNaN(y)){var C=new Image;C.onload=mxUtils.bind(this,function(){n=Math.max(1,C.width);y=Math.max(1,C.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]])});C.src=Editor.createSvgDataUri(mxUtils.getXml(l))}return A}}}catch(ea){}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{y=!1;if("image/png"==k.type){var C=B?null:this.extractGraphModelFromPng(b.target.result);if(null!=C&&0<C.length){var x=new Image;x.src=b.target.result;E(f,mxUtils.bind(this,function(){return g(C,"text/xml",c+f*p,d+f*p,x.width,x.height,k.name)}));y=!0}}y||(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){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/
+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){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)}})(C)});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"),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 E=document.createElement("canvas");E.width=p;E.height=q;var H=E.toDataURL();u!==H&&(c=u,f=p,l=q)}}}catch(D){}d(c,f,l)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=
+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 G=D.toDataURL();u!==G&&(c=u,f=p,l=q)}}}catch(F){}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()&&(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(L){b.handleError(L)}};
-c.getLinkTitle=function(c){return b.getLinkTitle(c)};c.customLinkClicked=function(c){var d=!1;try{b.handleCustomLink(c),d=!0}catch(G){b.handleError(G)}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,
+c.getLinkTitle=function(c){return b.getLinkTitle(c)};c.customLinkClicked=function(c){var d=!1;try{b.handleCustomLink(c),d=!0}catch(H){b.handleError(H)}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(c,d){var f=n.apply(this,arguments);if(null!=f&&null!=f.originalSrc)if(!d)f={src:f.originalSrc};else if(d&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var e=this.stylesheet;this.stylesheet=this.getDefaultStylesheet();f=b.createImageForPageLink(f.originalSrc);this.stylesheet=e}return f};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;
@@ -10833,9 +10835,9 @@ b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b)
/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(b){var f=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,f)),e/Math.max(1,b));c.insertImage(decodeURIComponent(d),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 E=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==
-this.styleInput?!0:E.apply(this,arguments)}}C=document.getElementById("geInfo");null!=C&&C.parentNode.removeChild(C);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)),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,
+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 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),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="+
@@ -10894,46 +10896,46 @@ c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.
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 q=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(q.container,300,80,!0,!1);q.init();return}if("draft"==l.action){var t=n(l.xml);this.spinner.stop();q=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),t,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(q.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{q.init()}catch(ba){k.postMessage(JSON.stringify({event:"draft",error:ba.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();var u=1==l.enableRecent,v=1==l.enableSearch,
-F=1==l.enableCustomTemp;if("1"==urlParams.newTempDlg&&!l.templatesOnly&&null!=l.callback){var x=this.getCurrentUser(),I=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!=x?x.id:null,u?mxUtils.bind(this,function(b,c,d){this.remoteInvoke("getRecentDiagrams",
-[d],null,b,c)}):null,v?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,F?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(I.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}q=new NewDialog(this,!1,l.templatesOnly?!1:null!=l.callback,mxUtils.bind(this,
+E=1==l.enableCustomTemp;if("1"==urlParams.newTempDlg&&!l.templatesOnly&&null!=l.callback){var x=this.getCurrentUser(),I=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!=x?x.id:null,u?mxUtils.bind(this,function(b,c,d){this.remoteInvoke("getRecentDiagrams",
+[d],null,b,c)}):null,v?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,E?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(I.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}q=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,u?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,"Network Error!")})}):null,v?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,F?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==l.withoutType);this.showDialog(q.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();b&&this.actions.get("exit").funct()}));q.init();return}if("textContent"==l.action){var L=
+[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,E?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==l.withoutType);this.showDialog(q.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();b&&this.actions.get("exit").funct()}));q.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 M=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,M):
-this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var Q=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var P=this.editor.graph,K=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=Q;k.postMessage(JSON.stringify(c),
-"*")}),X=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==l.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(Q)));P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);K(b)}),J=l.pageId||(null!=this.pages?l.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var N=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=J){var b=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());
-for(var c,d=0;d<this.pages.length;d++)if(this.pages[d].getId()==J){c=this.updatePageRoot(this.pages[d]);break}null==c&&(c=this.currentPage);P.getGlobalVariable=function(d){return"page"==d?c.getName():"pagenumber"==d?1:b.apply(this,arguments)};document.body.appendChild(P.container);P.model.setRoot(c.root)}if(null!=l.layerIds){for(var f=P.model,e=f.getChildCells(f.getRoot()),g={},d=0;d<l.layerIds.length;d++)g[l.layerIds[d]]=!0;for(d=0;d<e.length;d++)f.setVisible(e[d],g[e[d].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,
-function(b){X(b.toDataURL("image/png"))}),l.width,null,l.background,mxUtils.bind(this,function(){X(null)}),null,null,l.scale,l.transparent,l.shadow,null,P,l.border,null,l.grid,l.keepTheme)});null!=l.xml&&0<l.xml.length?(d=!0,this.setFileData(Q),d=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(N)},0):N()):N()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+(null!=J?"&pageId="+J:"")+(null!=l.layerIds&&0<l.layerIds.length?"&extras="+
-encodeURIComponent(JSON.stringify({layerIds:l.layerIds})):"")+(null!=l.scale?"&scale="+l.scale:"")+"&base64=1&xml="+encodeURIComponent(Q))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?K("data:image/png;base64,"+b.getText()):X(null)}),mxUtils.bind(this,function(){X(null)}))}}else N=mxUtils.bind(this,function(){var b=this.createLoadMessage("export");b.message=l;if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var c=
-this.getXmlFileData();b.xml=mxUtils.getXml(c);b.data=this.getFileData(null,null,!0,null,null,null,c);b.format=l.format}else if("html"==l.format)c=this.editor.getGraphXml(),b.data=this.getHtml(c,this.editor.graph),b.xml=mxUtils.getXml(c),b.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;c=null!=l.background?l.background:this.editor.graph.background;c==mxConstants.NONE&&(c=null);b.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);b.format="svg";var d=mxUtils.bind(this,
-function(c){this.editor.graph.setEnabled(!0);this.spinner.stop();b.data=Editor.createSvgDataUri(c);k.postMessage(JSON.stringify(b),"*")});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(b.xml,this.editor.graph,null,!0,d,null,null,l.embedImages,c,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),c=this.editor.graph.getSvg(c,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(c),this.embedFonts(c,mxUtils.bind(this,function(b){l.embedImages||null==l.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){d(mxUtils.getXml(b))})):d(mxUtils.getXml(b))}));return}k.postMessage(JSON.stringify(b),"*")}),null!=l.xml&&
-0<l.xml.length?(d=!0,this.setFileData(l.xml),d=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(N)},0):N()):N();return}if("load"==l.action){p=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);if(null!=l.rough){var O=Editor.sketchMode;
-this.doSetSketchMode(l.rough);O!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=l.dark&&(O=Editor.darkMode,this.doSetDarkMode(l.dark),O!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=l.border&&(this.embedExportBorder=l.border);var W=this.embedExportBorder;null!=l.background&&(this.embedExportBackground=l.background);null!=l.rect&&(this.diagramContainer.style.border="2px solid #295fcc",this.diagramContainer.style.top=l.rect.top+"px",this.diagramContainer.style.left=
-l.rect.left+"px",this.diagramContainer.style.height=l.rect.height+"px",this.diagramContainer.style.width=l.rect.width+"px",this.diagramContainer.style.bottom="",this.diagramContainer.style.right="",m=mxUtils.bind(this,function(){var b=this.editor.graph,c=b.maxFitScale;b.maxFitScale=l.maxFitScale;b.fit(2*W);b.maxFitScale=c;b.container.scrollTop-=2*W;b.container.scrollLeft-=2*W;this.fireEvent(new mxEventObject("editInlineStart","data",[l]))}));null!=l.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=
-l.noExitBtn);null!=l.title&&null!=this.buttonContainer&&(t=document.createElement("span"),mxUtils.write(t,l.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(t),this.embedFilenameSpan=t);try{l.libs&&this.sidebar.showEntries(l.libs)}catch(ba){}l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):null!=l.descriptor?l.descriptor:l.xml}else{if("merge"==l.action){var Y=this.getCurrentFile();null!=Y&&(t=n(l.xml),
-null!=t&&""!=t&&Y.mergeFile(new LocalFile(this,t),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(ba){this.handleError(ba)}}var ka=
-mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),aa=mxUtils.bind(this,function(g,l){d=!0;try{b(g,l,null,p)}catch(fa){this.handleError(fa)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");e=ka();f&&null==c&&(c=mxUtils.bind(this,function(b,c){var f=ka();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 n=this.createLoadMessage("load");n.xml=g;k.postMessage(JSON.stringify(n),"*")}null!=m&&m()});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){aa(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)&&aa(b.responseText,g)}),""):null!=l&&"function"===typeof l.substring&&this.isLucidChartData(l)?this.convertLucidChart(l,mxUtils.bind(this,function(b){aa(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):
+this.spinner.stop();return}if("exit"==l.action)this.actions.get("exit").funct();else{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 Q=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var P=this.editor.graph,K=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=Q;k.postMessage(JSON.stringify(c),"*")}),X=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==l.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(Q)));P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);K(b)}),J=l.pageId||(null!=this.pages?l.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var N=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=
+J){var b=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());for(var c,d=0;d<this.pages.length;d++)if(this.pages[d].getId()==J){c=this.updatePageRoot(this.pages[d]);break}null==c&&(c=this.currentPage);P.getGlobalVariable=function(d){return"page"==d?c.getName():"pagenumber"==d?1:b.apply(this,arguments)};document.body.appendChild(P.container);P.model.setRoot(c.root)}if(null!=l.layerIds){for(var f=P.model,e=f.getChildCells(f.getRoot()),g={},d=0;d<l.layerIds.length;d++)g[l.layerIds[d]]=
+!0;for(d=0;d<e.length;d++)f.setVisible(e[d],g[e[d].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){X(b.toDataURL("image/png"))}),l.width,null,l.background,mxUtils.bind(this,function(){X(null)}),null,null,l.scale,l.transparent,l.shadow,null,P,l.border,null,l.grid,l.keepTheme)});null!=l.xml&&0<l.xml.length?(d=!0,this.setFileData(Q),d=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(N)},0):N()):N()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+
+("xmlpng"==l.format?"1":"0")+(null!=J?"&pageId="+J:"")+(null!=l.layerIds&&0<l.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:l.layerIds})):"")+(null!=l.scale?"&scale="+l.scale:"")+"&base64=1&xml="+encodeURIComponent(Q))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?K("data:image/png;base64,"+b.getText()):X(null)}),mxUtils.bind(this,function(){X(null)}))}}else N=mxUtils.bind(this,function(){var b=this.createLoadMessage("export");b.message=l;if("html2"==
+l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var c=this.getXmlFileData();b.xml=mxUtils.getXml(c);b.data=this.getFileData(null,null,!0,null,null,null,c);b.format=l.format}else if("html"==l.format)c=this.editor.getGraphXml(),b.data=this.getHtml(c,this.editor.graph),b.xml=mxUtils.getXml(c),b.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;c=null!=l.background?l.background:this.editor.graph.background;c==mxConstants.NONE&&(c=null);b.xml=this.getFileData(!0,
+null,null,null,null,null,null,null,null,!1);b.format="svg";var d=mxUtils.bind(this,function(c){this.editor.graph.setEnabled(!0);this.spinner.stop();b.data=Editor.createSvgDataUri(c);k.postMessage(JSON.stringify(b),"*")});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(b.xml,this.editor.graph,null,!0,d,null,null,l.embedImages,c,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),c=this.editor.graph.getSvg(c,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(c),this.embedFonts(c,mxUtils.bind(this,function(b){l.embedImages||null==l.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){d(mxUtils.getXml(b))})):
+d(mxUtils.getXml(b))}));return}k.postMessage(JSON.stringify(b),"*")}),null!=l.xml&&0<l.xml.length?(d=!0,this.setFileData(l.xml),d=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(N)},0):N()):N();return}if("load"==l.action){p=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);if(null!=l.rough){var O=Editor.sketchMode;this.doSetSketchMode(l.rough);O!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=l.dark&&(O=Editor.darkMode,this.doSetDarkMode(l.dark),O!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=l.border&&(this.embedExportBorder=l.border);var W=this.embedExportBorder;null!=l.background&&(this.embedExportBackground=l.background);null!=l.rect&&(this.diagramContainer.style.border=
+"2px solid #295fcc",this.diagramContainer.style.top=l.rect.top+"px",this.diagramContainer.style.left=l.rect.left+"px",this.diagramContainer.style.height=l.rect.height+"px",this.diagramContainer.style.width=l.rect.width+"px",this.diagramContainer.style.bottom="",this.diagramContainer.style.right="",m=mxUtils.bind(this,function(){var b=this.editor.graph,c=b.maxFitScale;b.maxFitScale=l.maxFitScale;b.fit(2*W);b.maxFitScale=c;b.container.scrollTop-=2*W;b.container.scrollLeft-=2*W;this.fireEvent(new mxEventObject("editInlineStart",
+"data",[l]))}));null!=l.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=l.noExitBtn);null!=l.title&&null!=this.buttonContainer&&(t=document.createElement("span"),mxUtils.write(t,l.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(t),this.embedFilenameSpan=t);try{l.libs&&this.sidebar.showEntries(l.libs)}catch(ba){}l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):null!=l.descriptor?l.descriptor:
+l.xml}else{if("merge"==l.action){var Y=this.getCurrentFile();null!=Y&&(t=n(l.xml),null!=t&&""!=t&&Y.mergeFile(new LocalFile(this,t),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(ba){this.handleError(ba)}}var ka=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),aa=mxUtils.bind(this,function(g,l){d=!0;try{b(g,l,null,p)}catch(fa){this.handleError(fa)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");e=ka();f&&null==c&&(c=mxUtils.bind(this,function(b,c){var f=ka();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 n=this.createLoadMessage("load");n.xml=g;k.postMessage(JSON.stringify(n),"*")}null!=m&&m()});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){aa(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)&&aa(b.responseText,g)}),""):null!=l&&"function"===typeof l.substring&&this.isLucidChartData(l)?this.convertLucidChart(l,mxUtils.bind(this,function(b){aa(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),aa(l,g)):this.loadDescriptor(l,mxUtils.bind(this,function(b){aa(ka(),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&&"1"!=urlParams.embedInline){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"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||"1"==urlParams.atlas?"42px":"52px"}};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=[],l={};if(0<d.length){var k={},n=null,A=null,z=null,B=null,y=null,C=null,E="whiteSpace=wrap;html=1;",H=null,D=null,F="",G="auto",I="auto",L=null,M=null,Q=40,P=40,K=100,X=0,J=this.editor.graph;J.getGraphBounds();for(var N=function(){null!=c?c(la):(J.setSelectionCells(la),
-J.scrollCellToVisible(J.getSelectionCell()))},O=J.getFreeInsertPoint(),W=O.x,Y=O.y,O=Y,ka=null,aa="auto",D=null,ba=[],na=null,pa=null,fa=0;fa<d.length&&"#"==d[fa].charAt(0);){b=d[fa];for(fa++;fa<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[fa].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[fa].substring(1)),fa++;if("#"!=b.charAt(1)){var ca=b.indexOf(":");if(0<ca){var R=mxUtils.trim(b.substring(1,ca)),T=mxUtils.trim(b.substring(ca+1));"label"==R?ka=J.sanitizeHtml(T):"labelname"==R&&0<T.length&&
-"-"!=T?y=T:"labels"==R&&0<T.length&&"-"!=T?C=JSON.parse(T):"style"==R?A=T:"parentstyle"==R?E=T:"stylename"==R&&0<T.length&&"-"!=T?B=T:"styles"==R&&0<T.length&&"-"!=T?z=JSON.parse(T):"vars"==R&&0<T.length&&"-"!=T?n=JSON.parse(T):"identity"==R&&0<T.length&&"-"!=T?H=T:"parent"==R&&0<T.length&&"-"!=T?D=T:"namespace"==R&&0<T.length&&"-"!=T?F=T:"width"==R?G=T:"height"==R?I=T:"left"==R&&0<T.length?L=T:"top"==R&&0<T.length?M=T:"ignore"==R?pa=T.split(","):"connect"==R?ba.push(JSON.parse(T)):"link"==R?na=T:
-"padding"==R?X=parseFloat(T):"edgespacing"==R?Q=parseFloat(T):"nodespacing"==R?P=parseFloat(T):"levelspacing"==R?K=parseFloat(T):"layout"==R&&(aa=T)}}}if(null==d[fa])throw Error(mxResources.get("invalidOrMissingFile"));for(var ia=this.editor.csvToArray(d[fa]),R=ca=null,T=[],U=0;U<ia.length;U++)H==ia[U]&&(ca=U),D==ia[U]&&(R=U),T.push(mxUtils.trim(ia[U]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ka&&(ka="%"+T[0]+"%");if(null!=ba)for(var Z=0;Z<ba.length;Z++)null==k[ba[Z].to]&&
-(k[ba[Z].to]={});H=[];for(U=fa+1;U<d.length;U++){var ha=this.editor.csvToArray(d[U]);if(null==ha){var ra=40<d[U].length?d[U].substring(0,40)+"...":d[U];throw Error(ra+" ("+U+"):\n"+mxResources.get("containsValidationErrors"));}0<ha.length&&H.push(ha)}J.model.beginUpdate();try{for(U=0;U<H.length;U++){var ha=H[U],V=null,ea=null!=ca?F+ha[ca]:null;null!=ea&&(V=J.model.getCell(ea));var d=null!=V,ga=new mxCell(ka,new mxGeometry(W,O,0,0),A||"whiteSpace=wrap;html=1;");ga.vertex=!0;ga.id=ea;for(var ja=0;ja<
+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=[],l={};if(0<d.length){var k={},n=null,A=null,z=null,B=null,y=null,C=null,D="whiteSpace=wrap;html=1;",G=null,F=null,E="",H="auto",I="auto",L=null,M=null,Q=40,P=40,K=100,X=0,J=this.editor.graph;J.getGraphBounds();for(var N=function(){null!=c?c(la):(J.setSelectionCells(la),
+J.scrollCellToVisible(J.getSelectionCell()))},O=J.getFreeInsertPoint(),W=O.x,Y=O.y,O=Y,ka=null,aa="auto",F=null,ba=[],na=null,pa=null,fa=0;fa<d.length&&"#"==d[fa].charAt(0);){b=d[fa];for(fa++;fa<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[fa].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[fa].substring(1)),fa++;if("#"!=b.charAt(1)){var ca=b.indexOf(":");if(0<ca){var R=mxUtils.trim(b.substring(1,ca)),T=mxUtils.trim(b.substring(ca+1));"label"==R?ka=J.sanitizeHtml(T):"labelname"==R&&0<T.length&&
+"-"!=T?y=T:"labels"==R&&0<T.length&&"-"!=T?C=JSON.parse(T):"style"==R?A=T:"parentstyle"==R?D=T:"stylename"==R&&0<T.length&&"-"!=T?B=T:"styles"==R&&0<T.length&&"-"!=T?z=JSON.parse(T):"vars"==R&&0<T.length&&"-"!=T?n=JSON.parse(T):"identity"==R&&0<T.length&&"-"!=T?G=T:"parent"==R&&0<T.length&&"-"!=T?F=T:"namespace"==R&&0<T.length&&"-"!=T?E=T:"width"==R?H=T:"height"==R?I=T:"left"==R&&0<T.length?L=T:"top"==R&&0<T.length?M=T:"ignore"==R?pa=T.split(","):"connect"==R?ba.push(JSON.parse(T)):"link"==R?na=T:
+"padding"==R?X=parseFloat(T):"edgespacing"==R?Q=parseFloat(T):"nodespacing"==R?P=parseFloat(T):"levelspacing"==R?K=parseFloat(T):"layout"==R&&(aa=T)}}}if(null==d[fa])throw Error(mxResources.get("invalidOrMissingFile"));for(var ia=this.editor.csvToArray(d[fa]),R=ca=null,T=[],U=0;U<ia.length;U++)G==ia[U]&&(ca=U),F==ia[U]&&(R=U),T.push(mxUtils.trim(ia[U]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ka&&(ka="%"+T[0]+"%");if(null!=ba)for(var Z=0;Z<ba.length;Z++)null==k[ba[Z].to]&&
+(k[ba[Z].to]={});G=[];for(U=fa+1;U<d.length;U++){var ha=this.editor.csvToArray(d[U]);if(null==ha){var ra=40<d[U].length?d[U].substring(0,40)+"...":d[U];throw Error(ra+" ("+U+"):\n"+mxResources.get("containsValidationErrors"));}0<ha.length&&G.push(ha)}J.model.beginUpdate();try{for(U=0;U<G.length;U++){var ha=G[U],V=null,ea=null!=ca?E+ha[ca]:null;null!=ea&&(V=J.model.getCell(ea));var d=null!=V,ga=new mxCell(ka,new mxGeometry(W,O,0,0),A||"whiteSpace=wrap;html=1;");ga.vertex=!0;ga.id=ea;for(var ja=0;ja<
ha.length;ja++)J.setAttributeForCell(ga,T[ja],ha[ja]);if(null!=y&&null!=C){var oa=C[ga.getAttribute(y)];null!=oa&&J.labelChanged(ga,oa)}if(null!=B&&null!=z){var ua=z[ga.getAttribute(B)];null!=ua&&(ga.style=ua)}J.setAttributeForCell(ga,"placeholders","1");ga.style=J.replacePlaceholders(ga,ga.style,n);d?(J.model.setValue(V,ga.value),J.model.setStyle(V,ga.style),0>mxUtils.indexOf(g,V)&&g.push(V),J.fireEvent(new mxEventObject("cellsInserted","cells",[V]))):J.fireEvent(new mxEventObject("cellsInserted",
-"cells",[ga]));V=ga;if(!d)for(Z=0;Z<ba.length;Z++)k[ba[Z].to][V.getAttribute(ba[Z].to)]=V;null!=na&&"link"!=na&&(J.setLinkForCell(V,V.getAttribute(na)),J.setAttributeForCell(V,na,null));var S=this.editor.graph.getPreferredSizeForCell(V),D=null!=R?J.model.getCell(F+ha[R]):null;if(V.vertex){ra=null!=D?0:W;fa=null!=D?0:Y;null!=L&&null!=V.getAttribute(L)&&(V.geometry.x=ra+parseFloat(V.getAttribute(L)));null!=M&&null!=V.getAttribute(M)&&(V.geometry.y=fa+parseFloat(V.getAttribute(M)));var da="@"==G.charAt(0)?
-V.getAttribute(G.substring(1)):null;V.geometry.width=null!=da&&"auto"!=da?parseFloat(V.getAttribute(G.substring(1))):"auto"==G||"auto"==da?S.width+X:parseFloat(G);var ma="@"==I.charAt(0)?V.getAttribute(I.substring(1)):null;V.geometry.height=null!=ma&&"auto"!=ma?parseFloat(ma):"auto"==I||"auto"==ma?S.height+X:parseFloat(I);O+=V.geometry.height+P}d?(null==l[ea]&&(l[ea]=[]),l[ea].push(V)):(f.push(V),null!=D?(D.style=J.replacePlaceholders(D,E,n),J.addCell(V,D),e.push(D)):g.push(J.addCell(V)))}for(U=0;U<
-e.length;U++)da="@"==G.charAt(0)?e[U].getAttribute(G.substring(1)):null,ma="@"==I.charAt(0)?e[U].getAttribute(I.substring(1)):null,"auto"!=G&&"auto"!=da||"auto"!=I&&"auto"!=ma||J.updateGroupBounds([e[U]],X,!0);for(var sa=g.slice(),la=g.slice(),Z=0;Z<ba.length;Z++)for(var qa=ba[Z],U=0;U<f.length;U++){var V=f[U],ta=mxUtils.bind(this,function(b,c,d){var f=c.getAttribute(d.from);if(null!=f&&""!=f)for(var f=f.split(","),e=0;e<f.length;e++){var g=k[d.to][f[e]];if(null!=g){var l=d.label;null!=d.fromlabel&&
+"cells",[ga]));V=ga;if(!d)for(Z=0;Z<ba.length;Z++)k[ba[Z].to][V.getAttribute(ba[Z].to)]=V;null!=na&&"link"!=na&&(J.setLinkForCell(V,V.getAttribute(na)),J.setAttributeForCell(V,na,null));var S=this.editor.graph.getPreferredSizeForCell(V),F=null!=R?J.model.getCell(E+ha[R]):null;if(V.vertex){ra=null!=F?0:W;fa=null!=F?0:Y;null!=L&&null!=V.getAttribute(L)&&(V.geometry.x=ra+parseFloat(V.getAttribute(L)));null!=M&&null!=V.getAttribute(M)&&(V.geometry.y=fa+parseFloat(V.getAttribute(M)));var da="@"==H.charAt(0)?
+V.getAttribute(H.substring(1)):null;V.geometry.width=null!=da&&"auto"!=da?parseFloat(V.getAttribute(H.substring(1))):"auto"==H||"auto"==da?S.width+X:parseFloat(H);var ma="@"==I.charAt(0)?V.getAttribute(I.substring(1)):null;V.geometry.height=null!=ma&&"auto"!=ma?parseFloat(ma):"auto"==I||"auto"==ma?S.height+X:parseFloat(I);O+=V.geometry.height+P}d?(null==l[ea]&&(l[ea]=[]),l[ea].push(V)):(f.push(V),null!=F?(F.style=J.replacePlaceholders(F,D,n),J.addCell(V,F),e.push(F)):g.push(J.addCell(V)))}for(U=0;U<
+e.length;U++)da="@"==H.charAt(0)?e[U].getAttribute(H.substring(1)):null,ma="@"==I.charAt(0)?e[U].getAttribute(I.substring(1)):null,"auto"!=H&&"auto"!=da||"auto"!=I&&"auto"!=ma||J.updateGroupBounds([e[U]],X,!0);for(var sa=g.slice(),la=g.slice(),Z=0;Z<ba.length;Z++)for(var qa=ba[Z],U=0;U<f.length;U++){var V=f[U],ta=mxUtils.bind(this,function(b,c,d){var f=c.getAttribute(d.from);if(null!=f&&""!=f)for(var f=f.split(","),e=0;e<f.length;e++){var g=k[d.to][f[e]];if(null!=g){var l=d.label;null!=d.fromlabel&&
(l=(c.getAttribute(d.fromlabel)||"")+(l||""));null!=d.sourcelabel&&(l=J.replacePlaceholders(c,d.sourcelabel,n)+(l||""));null!=d.tolabel&&(l=(l||"")+(g.getAttribute(d.tolabel)||""));null!=d.targetlabel&&(l=(l||"")+J.replacePlaceholders(g,d.targetlabel,n));var m="target"==d.placeholders==!d.invert?g:b,m=null!=d.style?J.replacePlaceholders(m,d.style,n):J.createCurrentEdgeStyle(),l=J.insertEdge(null,null,l||"",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],
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=J.replacePlaceholders("target"==p.placeholders==!d.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(d.invert?b:g,sa)}}});ta(V,V,qa);if(null!=l[V.id])for(ja=0;ja<l[V.id].length;ja++)ta(V,l[V.id][ja],qa)}if(null!=pa)for(U=
-0;U<f.length;U++)for(V=f[U],ja=0;ja<pa.length;ja++)J.setAttributeForCell(V,mxUtils.trim(pa[ja]),null);if(0<g.length){var va=new mxParallelEdgeLayout(J);va.spacing=Q;va.checkOverlap=!0;var xa=function(){0<va.spacing&&va.execute(J.getDefaultParent());for(var b=0;b<g.length;b++){var c=J.getCellGeometry(g[b]);c.x=Math.round(J.snap(c.x));c.y=Math.round(J.snap(c.y));"auto"==G&&(c.width=Math.round(J.snap(c.width)));"auto"==I&&(c.height=Math.round(J.snap(c.height)))}};if("["==aa.charAt(0)){var Ba=N;J.view.validate();
+0;U<f.length;U++)for(V=f[U],ja=0;ja<pa.length;ja++)J.setAttributeForCell(V,mxUtils.trim(pa[ja]),null);if(0<g.length){var va=new mxParallelEdgeLayout(J);va.spacing=Q;va.checkOverlap=!0;var xa=function(){0<va.spacing&&va.execute(J.getDefaultParent());for(var b=0;b<g.length;b++){var c=J.getCellGeometry(g[b]);c.x=Math.round(J.snap(c.x));c.y=Math.round(J.snap(c.y));"auto"==H&&(c.width=Math.round(J.snap(c.width)));"auto"==I&&(c.height=Math.round(J.snap(c.height)))}};if("["==aa.charAt(0)){var Ba=N;J.view.validate();
this.executeLayoutList(JSON.parse(aa),function(){xa();Ba()});N=null}else if("circle"==aa){var wa=new mxCircleLayout(J);wa.disableEdgeStyle=!1;wa.resetEdges=!1;var za=wa.isVertexIgnored;wa.isVertexIgnored=function(b){return za.apply(this,arguments)||0>mxUtils.indexOf(g,b)};this.executeLayout(function(){wa.execute(J.getDefaultParent());xa()},!0,N);N=null}else if("horizontaltree"==aa||"verticaltree"==aa||"auto"==aa&&la.length==2*g.length-1&&1==sa.length){J.view.validate();var Ca=new mxCompactTreeLayout(J,
"horizontaltree"==aa);Ca.levelDistance=P;Ca.edgeRouting=!1;Ca.resetEdges=!1;this.executeLayout(function(){Ca.execute(J.getDefaultParent(),0<sa.length?sa[0]:null)},!0,N);N=null}else if("horizontalflow"==aa||"verticalflow"==aa||"auto"==aa&&1==sa.length){J.view.validate();var ya=new mxHierarchicalLayout(J,"horizontalflow"==aa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ya.intraCellSpacing=P;ya.parallelEdgeSpacing=Q;ya.interRankCellSpacing=K;ya.disableEdgeStyle=!1;this.executeLayout(function(){ya.execute(J.getDefaultParent(),
la);J.moveCells(la,W,Y)},!0,N);N=null}else if("organic"==aa||"auto"==aa&&la.length>g.length){J.view.validate();var Aa=new mxFastOrganicLayout(J);Aa.forceConstant=3*P;Aa.disableEdgeStyle=!1;Aa.resetEdges=!1;var Da=Aa.isVertexIgnored;Aa.isVertexIgnored=function(b){return Da.apply(this,arguments)||0>mxUtils.indexOf(g,b)};this.executeLayout(function(){Aa.execute(J.getDefaultParent());xa()},!0,N);N=null}}this.hideDialog()}finally{J.model.endUpdate()}null!=N&&N()}}catch(Ea){this.handleError(Ea)}};EditorUi.prototype.getSearch=
@@ -10962,8 +10964,8 @@ arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteI
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=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(G){}"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(G){console.log(G)}});window.addEventListener("message",b)}})));b(d);d.onversionchange=
+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(H){}"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(H){console.log(H)}});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();
@@ -10971,33 +10973,33 @@ f.onsuccess=function(){b(f.result)};f.onerror=c}catch(t){null!=c&&c(t)}}),c)};Ed
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,B,y,C,E,H){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,d,e,g,k,n,v,
-x,A,z,B,y,C,E,H)};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)};
+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,B,y,C,D,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,d,e,g,k,n,v,
+x,A,z,B,y,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=B.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==B&&c++;y.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)});A.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=E;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){y.style.display="none";var E=document.createElement("div");E.className="geCommentContainer";E.setAttribute("data-commentId",c.id);E.style.marginLeft=20*g+5+"px";c.isResolved&&!Editor.isDarkMode()&&(E.style.backgroundColor="ghostWhite");
-var D=document.createElement("div");D.className="geCommentHeader";var z=document.createElement("img");z.className="geCommentUserImg";z.src=c.user.pictureUrl||Editor.userImage;D.appendChild(z);z=document.createElement("div");z.className="geCommentHeaderTxt";D.appendChild(z);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,c.user.displayName||"");z.appendChild(Q);Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",c.id);l(c,
-Q);z.appendChild(Q);E.appendChild(D);D=document.createElement("div");D.className="geCommentTxt";mxUtils.write(D,c.content||"");E.appendChild(D);c.isLocked&&(E.style.opacity="0.5");D=document.createElement("div");D.className="geCommentActions";var A=document.createElement("ul");A.className="geCommentActionsList";D.appendChild(A);u||c.isLocked||0!=g&&!v||F(mxResources.get("reply"),function(){M("",!0)},c.isResolved);z=b.getCurrentUser();null==z||z.id!=c.user.id||u||c.isLocked||(F(mxResources.get("edit"),
-function(){function d(){f(c,E,function(){m(E);c.editComment(c.content,function(){q(E)},function(c){p(E);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(E);c.deleteComment(function(b){if(!0===b){b=E.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var e=E.querySelectorAll(".geCommentAction");for(b=
-0;b<e.length;b++)e[b].parentNode.removeChild(e[b]);q(E);E.style.opacity="0.5"}else{e=C(c).replies;for(b=0;b<e.length;b++)B.removeChild(e[b]);for(b=0;b<d.length;b++)if(d[b]==c){d.splice(b,1);break}y.style.display=0==B.getElementsByTagName("div").length?"block":"none"}},function(c){p(E);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);H||(f[k].style.display="none")}n()}c.isResolved?M(mxResources.get("reOpened")+": ",!0,
-d,!1,!0):M(mxResources.get("markedAsResolved"),!1,d,!0)});E.appendChild(D);null!=e?B.insertBefore(E,e.nextSibling):B.appendChild(E);for(e=0;null!=c.replies&&e<c.replies.length;e++)D=c.replies[e],D.isResolved=c.isResolved,t(D,c.replies,null,g+1,k);null!=x&&(x.comment.id==c.id?(k=c.content,c.content=x.comment.content,f(c,E,x.saveCallback,x.deleteOnCancel),c.content=k):null==x.comment.id&&x.comment.pCommentId==c.id&&(B.appendChild(x.div),f(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return E}}
+[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 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)});A.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(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,n)}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){y.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 F=document.createElement("div");F.className="geCommentHeader";var z=document.createElement("img");z.className="geCommentUserImg";z.src=c.user.pictureUrl||Editor.userImage;F.appendChild(z);z=document.createElement("div");z.className="geCommentHeaderTxt";F.appendChild(z);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,c.user.displayName||"");z.appendChild(Q);Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",c.id);l(c,
+Q);z.appendChild(Q);D.appendChild(F);F=document.createElement("div");F.className="geCommentTxt";mxUtils.write(F,c.content||"");D.appendChild(F);c.isLocked&&(D.style.opacity="0.5");F=document.createElement("div");F.className="geCommentActions";var A=document.createElement("ul");A.className="geCommentActionsList";F.appendChild(A);u||c.isLocked||0!=g&&!v||E(mxResources.get("reply"),function(){M("",!0)},c.isResolved);z=b.getCurrentUser();null==z||z.id!=c.user.id||u||c.isLocked||(E(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),E(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++)B.removeChild(e[b]);for(b=0;b<d.length;b++)if(d[b]==c){d.splice(b,1);break}y.style.display=0==B.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"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);G||(f[k].style.display="none")}n()}c.isResolved?M(mxResources.get("reOpened")+": ",!0,
+d,!1,!0):M(mxResources.get("markedAsResolved"),!1,d,!0)});D.appendChild(F);null!=e?B.insertBefore(D,e.nextSibling):B.appendChild(D);for(e=0;null!=c.replies&&e<c.replies.length;e++)F=c.replies[e],F.isResolved=c.isResolved,t(F,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&&(B.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",B=document.createElement("div");B.className="geCommentsList";B.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";B.style.bottom=parseInt(z)+7+"px";A.appendChild(B);var y=document.createElement("span");y.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(y,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 E=z.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(E,"click",function(c){function d(){f(e,g,function(c){m(g);b.addComment(c,function(b){c.id=b;D.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,D,null,0);d();c.preventDefault();mxEvent.consume(c)});C.appendChild(E)}E=z.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));
-var H=!1;Editor.isDarkMode()&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(b){this.className=(H=!H)?"geButton geCheckedBtn":"geButton";F();b.preventDefault();mxEvent.consume(b)});C.appendChild(E);b.commentsRefreshNeeded()&&(E=z.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(b){F();
-b.preventDefault();mxEvent.consume(b)}),C.appendChild(E));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 D=[],F=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);
+mxUtils.write(y,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;F.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,F,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){k();b.preventDefault();mxEvent.consume(b)}),C.appendChild(z));A.appendChild(C);var F=[],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)}B.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)});B.innerHTML="";B.appendChild(y);y.style.display="block";D=b;for(b=0;b<D.length;b++)c(D[b].replies),t(D[b],D,null,0,H);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(B.appendChild(x.div),f(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(b){B.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
-": "+b.message:""));this.hasError=!0})):B.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=B.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var f=c[e];d[f.getAttribute("data-commentId")]=f}for(e=0;e<D.length;e++)b(D[e])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=
+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)});B.innerHTML="";B.appendChild(y);y.style.display="block";F=b;for(b=0;b<F.length;b++)c(F[b].replies),t(F[b],F,null,0,G);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(B.appendChild(x.div),f(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(b){B.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
+": "+b.message:""));this.hasError=!0})):B.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=B.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var f=c[e];d[f.getAttribute("data-commentId")]=f}for(e=0;e<F.length;e++)b(F[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||
-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 G=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",G);this.destroy=function(){mxEvent.removeListener(window,"resize",G);this.window.destroy()}},ConfirmDialog=function(b,e,d,
+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 H=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",H);this.destroy=function(){mxEvent.removeListener(window,"resize",H);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,
@@ -11171,20 +11173,20 @@ else if(d.mimeType==this.libraryMimeType||n)d.mimeType!=this.libraryMimeType||n?
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(B){if(null!=e)e(B);else throw B;}}),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(G){}}),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,B=this.ui.useCanvasForExport&&/(\.png)$/i.test(b.getTitle());f=null!=f?f:!1;var y=null,C=!1,E={mimeType:b.desc.mimeType,title:b.getTitle()};if(this.isGoogleRealtimeMimeType(E.mimeType))E.mimeType=this.xmlMimeType,y=b.desc,C=c=!0;else if("application/octet-stream"==E.mimeType||"1"==urlParams["override-mime"]&&E.mimeType!=this.xmlMimeType)E.mimeType=this.xmlMimeType;
-var H=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&&(E.thumbnail={image:k,mimeType:n}));var t=b.getData(),F=mxUtils.bind(this,function(d){try{if(b.saveDelay=(new Date).getTime()-
+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(H){}}),u=mxUtils.bind(this,function(b){g(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,B=this.ui.useCanvasForExport&&/(\.png)$/i.test(b.getTitle());f=null!=f?f:!1;var y=null,C=!1,D={mimeType:b.desc.mimeType,title:b.getTitle()};if(this.isGoogleRealtimeMimeType(D.mimeType))D.mimeType=this.xmlMimeType,y=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(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(),E=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,"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(N){}}else if(b.saveLevel=null,e(d,t),null!=y){this.executeRequest({url:"/files/"+y.id+"/revisions/"+y.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(b){b.pinned=!0;this.executeRequest({url:"/files/"+y.id+"/revisions/"+
-y.headRevisionId,method:"PUT",params:b})})));try{EditorUi.logEvent({category:b.convertedFrom+"-CONVERT-FILE-"+b.getHash(),action:"from_"+y.id+"."+y.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(N){}}}}catch(N){u(N)}}),M=mxUtils.bind(this,function(e,f){b.saveLevel=4;try{null!=m&&(E.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(ba){}this.executeRequest(this.createUploadRequest(b.getId(),E,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);
+y.headRevisionId,method:"PUT",params:b})})));try{EditorUi.logEvent({category:b.convertedFrom+"-CONVERT-FILE-"+b.getHash(),action:"from_"+y.id+"."+y.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(N){}}}}catch(N){u(N)}}),M=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(ba){}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&&E(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(y,f);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",d,"delay",f)}else{y(!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(na){u(na)}}}))}catch(ba){u(ba)}}),y=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(aa){}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(ba){u(ba)}}}),mxUtils.bind(this,function(c){window.clearTimeout(e);d&&(b.saveLevel=11,g(c))}))}});if(B&&null==k){b.saveLevel=8;var q=new Image;q.onload=mxUtils.bind(this,function(){try{var b=this.thumbnailWidth/q.width,c=document.createElement("canvas");
-c.width=this.thumbnailWidth;c.height=Math.floor(q.height*b);c.getContext("2d").drawImage(q,0,0,c.width,c.height);var d=c.toDataURL(),d=d.substring(d.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");E.thumbnail={image:d,mimeType:"image/png"};y(!1)}catch(aa){try{y(!1)}catch(ba){u(ba)}}});q.src="data:image/png;base64,"+e}else y(!1)}catch(W){u(W)}});if(B){var D=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){M(b,!0)}),g,this.ui.getCurrentFile()!=
-b?t:null,D.scale,D.border)}else M(t,!1)}catch(P){u(P)}});try{b.saveLevel=2,(f||B||b.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=E.mimeType&&"application/vnd.jgraph.mxfile"!=E.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(G){c=null}H(c,
-"image/png")}catch(G){u(G)}})))&&H(null,null,b.constructor!=DriveLibrary)}catch(D){u(D)}}else this.ui.editor.graph.reset(),g({message:mxResources.get("readOnly")})}catch(D){u(D)}};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&&
+c.width=this.thumbnailWidth;c.height=Math.floor(q.height*b);c.getContext("2d").drawImage(q,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"};y(!1)}catch(aa){try{y(!1)}catch(ba){u(ba)}}});q.src="data:image/png;base64,"+e}else y(!1)}catch(W){u(W)}});if(B){var G=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){M(b,!0)}),g,this.ui.getCurrentFile()!=
+b?t:null,G.scale,G.border)}else M(t,!1)}catch(P){u(P)}});try{b.saveLevel=2,(f||B||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(H){c=null}G(c,
+"image/png")}catch(H){u(H)}})))&&G(null,null,b.constructor!=DriveLibrary)}catch(F){u(F)}}else this.ui.editor.graph.reset(),g({message:mxResources.get("readOnly")})}catch(F){u(F)}};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=
@@ -11250,7 +11252,7 @@ OneDriveFile.prototype.move=function(b,e,d){this.ui.oneDrive.moveFile(this.getId
"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,
+(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,g.mail,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,
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,
@@ -11263,9 +11265,9 @@ function(b){var d=b.split("/");return 1<d.length?{driveId:d[0],id:d[1]}:{id:b}};
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 m=!0,n=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(n),m){/\.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 p=
b.substring(22);b=window.atob&&!mxClient.IS_SF?atob(p):Base64.decode(p)}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(n);m&&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,
+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(n);m&&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"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:
+null}):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,
@@ -11275,14 +11277,14 @@ this.ui.timeout)}catch(t){}var q=new mxXmlRequest(e+"/createUploadSession","{}",
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,
-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: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")};
+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.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);e.style.width=k.container.parentNode.style.width;e.style.height=parseInt(k.container.parentNode.style.height)-60+"px";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,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: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};
@@ -11402,24 +11404,23 @@ var n=m.results,y=0;if(null==n||0==n.length)mxUtils.write(f,mxResources.get("noD
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,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)};
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=b.file?"image/png"==b.file.mimeType:!1;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(T){}e()}};g&&f.overrideMimeType&&f.overrideMimeType("text/plain; charset=x-user-defined");f.send()}function x(){q&&null!=I?G.exportToCanvas(function(b){b=EditorUi.prototype.createImageDataUri(b,null,"png");n(L,b);k(L)},400,null,null,function(b){console.log(b)},600,null,null,null,null,null,I):
-(n(L,void 0),k(L))}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),X=b,v(b,function(c){if(X==b){var d=c.getElementsByTagName("diagram");I=AspectDialog.prototype.createViewer(O,0==d.length?c.documentElement:d[0],null,"transparent");F.stop()}},
+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(T){}e()}};g&&f.overrideMimeType&&f.overrideMimeType("text/plain; charset=x-user-defined");f.send()}function x(){q&&null!=I?H.exportToCanvas(function(b){b=EditorUi.prototype.createImageDataUri(b,null,"png");n(L,b);k(L)},400,null,null,function(b){console.log(b)},600,null,null,null,null,null,I):
+(n(L,void 0),k(L))}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),X=b,v(b,function(c){if(X==b){var d=c.getElementsByTagName("diagram");I=AspectDialog.prototype.createViewer(O,0==d.length?c.documentElement:d[0],null,"transparent");E.stop()}},
function(){L=null;c(mxResources.get("notADiagramFile"))})}catch(ba){L=null,c(mxResources.get("notADiagramFile"))}}}function z(){var b=u(".odFilesBreadcrumb");if(null!=b){b.innerHTML="";for(var c=0;c<P.length-1;c++){var d=document.createElement("span");d.className="odBCFolder";d.innerHTML=mxUtils.htmlEntities(P[c].name||mxResources.get("home"));b.appendChild(d);(function(b,c){d.addEventListener("click",function(){e(null);P=P.slice(0,c);y(b.driveId,b.folderId,b.siteId,b.name)})})(P[c],c);var f=document.createElement("span");
f.innerHTML=" &gt; ";b.appendChild(f)}null!=P[P.length-1]&&(c=document.createElement("span"),c.innerHTML=mxUtils.htmlEntities(1==P.length?mxResources.get("officeSelDiag"):P[P.length-1].name||mxResources.get("home")),b.appendChild(c))}}function B(){if(null!=L&&!Q)if("sharepoint"==M)y("site",null,L.id,L.displayName);else if("site"==M)y("subsite",null,L.id,L.name);else{var b=L.folder;L=L.remoteItem?L.remoteItem:L;var c=(L.parentReference?L.parentReference.driveId:null)||M,d=L.id;b?y(c,d,null,L.name):
-x()}}function y(c,k,m,n,p){function y(d){F.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,y=mxUtils.htmlEntities(n.description||p),q=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 x=document.createElement("td");x.style.width="24px";var E=document.createElement("img");E.src="/images/"+(u?"folder.png":"file.png");E.className="odFileImg";E.width=24;x.appendChild(E);v.appendChild(x);x=document.createElement("td");u=document.createElement("span");u.className="odFileTitle";u.innerHTML=null!=p&&p.length>q?mxUtils.htmlEntities(p.substring(0,q))+"&hellip;":mxUtils.htmlEntities(p);u.setAttribute("title",y);x.appendChild(u);v.appendChild(x);f.appendChild(v);null==g&&(g=v,g.className+=
-" odRowSelected",L=n,M=c,e(L));(function(b,d){v.addEventListener("dblclick",B);v.addEventListener("click",function(){g!=d&&(g.className=g.className.replace("odRowSelected",""),g=d,g.className+=" odRowSelected",L=b,M=c,e(L))})})(n,v)}}}0==k?(d=document.createElement("div"),d.className="odEmptyFolder",d.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),C.appendChild(d)):C.appendChild(f);z();Q=!1}if(!Q){u(".odCatsList").style.display="block";u(".odFilesSec").style.display=
-"block";null!=O&&(O.innerHTML="",O.style.top="50%");var q=Q=!0,t=0;K=arguments;var v=setTimeout(function(){Q=q=!1;F.stop();f(mxResources.get("timeout"))},2E4),C=u(".odFilesList");C.innerHTML="";F.spin(C);var x;switch(c){case "recent":P=[{name:mxResources.get("recent",null,"Recent"),driveId:c}];x=g()||{};var E=[],D;for(D in x)E.push(x[D]);clearTimeout(v);y(E);return;case "shared":x="/me/drive/sharedWithMe";P=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:c}];break;case "sharepoint":x=
-"/sites?search=";P=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:c}];t=1;break;case "site":P.push({name:n,driveId:c,folderId:k,siteId:m});x="/sites/"+m+"/drives";t=2;break;case "subsite":P.push({name:n,driveId:c,folderId:k,siteId:m});x="/drives/"+m+(k?"/items/"+k:"/root")+"/children";break;case "search":c=M;P=[{driveId:c,name:mxResources.get("back",null,"Back")}];p=encodeURIComponent(p.replace(/\'/g,"\\'"));x=c?"/drives/"+c+"/root/search(q='"+p+"')":"/me/drive/root/search(q='"+
-p+"')";break;default:null==k?P=[{driveId:c}]:P.push({name:n,driveId:c,folderId:k}),x=(c?"/drives/"+c:"/me/drive")+(k?"/items/"+k:"/root")+"/children"}t||(x+=(0<x.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");d(x,function(b){if(q){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)}y(c)}},function(b){if(q){clearTimeout(v);var c=null;try{c=JSON.parse(b.responseText).error.message}catch(ea){}f(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=c?" ("+c+")":""));Q=!1;F.stop()}})}}function C(b){W.className=W.className.replace("odCatSelected","");W=b;W.className+=" odCatSelected"}function E(b){Q||
-(Y=null,y("search",null,null,null,b))}var H="";null==e&&(e=A,H='<div style="text-align: center;" class="odPreview"></div>');null==g&&(g=function(){var b=null;try{b=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(aa){}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 H='<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>'+H+(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>":""),
-D=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode(),D=".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 {"+
-(D?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(D?"":"\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}),G=new Editor,I=null,L=null,M=null,Q=!1,P=[],K=null,X=null;this.getSelectedItem=function(){null!=L&&k(L);return L};if(null==u("#mxODPickerCss")){var J=document.head||document.getElementsByTagName("head")[0],N=document.createElement("style");J.appendChild(N);N.type="text/css";N.id="mxODPickerCss";N.appendChild(document.createTextNode(D))}b.innerHTML=
-H;for(var O=u(".odPreview"),W=u("#odFiles"),H=function(b,c){c=c||document;return c.querySelectorAll(b)}(".odCatListTitle"),D=0;D<H.length;D++)H[D].addEventListener("click",function(){L=X=null;if(!Q)switch(C(this),this.id){case "odFiles":y();break;case "odRecent":y("recent");break;case "odShared":y("shared");break;case "odSharepoint":y("sharepoint")}});var Y=null;u("#odSearchBox").addEventListener("keyup",function(b){var c=this;null!=Y&&clearTimeout(Y);13==b.keyCode?E(c.value):Y=setTimeout(function(){E(c.value)},
+x()}}function y(b,c,k,m,n){function p(c){E.stop();var d=document.createElement("table");d.className="odFileListGrid";for(var f=null,g=0,k=0;null!=c&&k<c.length;k++){var m=c[k];if(1!=q||!m.webUrl||0<m.webUrl.indexOf("sharepoint.com/sites/")||0>m.webUrl.indexOf("sharepoint.com/")){var n=m.displayName||m.name,p=mxUtils.htmlEntities(m.description||n);q&&(m.folder=!0);var y=null!=m.folder;if(!l||y){var t=document.createElement("tr");t.className=g++%2?"odOddRow":"odEvenRow";var u=document.createElement("td");
+u.style.width="36px";var C=document.createElement("img");C.src="/images/"+(y?"folder.png":"file.png");C.className="odFileImg";u.appendChild(C);t.appendChild(u);u=document.createElement("td");y=document.createElement("div");y.className="odFileTitle";y.innerHTML=mxUtils.htmlEntities(n);y.setAttribute("title",p);u.appendChild(y);t.appendChild(u);d.appendChild(t);null==f&&(f=t,f.className+=" odRowSelected",L=m,M=b,e(L));(function(c,d){t.addEventListener("dblclick",B);t.addEventListener("click",function(){f!=
+d&&(f.className=f.className.replace("odRowSelected",""),f=d,f.className+=" odRowSelected",L=c,M=b,e(L))})})(m,t)}}}0==g?(c=document.createElement("div"),c.className="odEmptyFolder",c.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),v.appendChild(c)):v.appendChild(d);z();Q=!1}if(!Q){u(".odCatsList").style.display="block";u(".odFilesSec").style.display="block";null!=O&&(O.innerHTML="",O.style.top="50%");var y=Q=!0,q=0;K=arguments;var t=setTimeout(function(){Q=y=
+!1;E.stop();f(mxResources.get("timeout"))},2E4),v=u(".odFilesList");v.innerHTML="";E.spin(v);var C;switch(b){case "recent":P=[{name:mxResources.get("recent",null,"Recent"),driveId:b}];C=g()||{};var x=[],D;for(D in C)x.push(C[D]);clearTimeout(t);p(x);return;case "shared":C="/me/drive/sharedWithMe";P=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:b}];break;case "sharepoint":C="/sites?search=";P=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:b}];q=1;break;
+case "site":P.push({name:m,driveId:b,folderId:c,siteId:k});C="/sites/"+k+"/drives";q=2;break;case "subsite":P.push({name:m,driveId:b,folderId:c,siteId:k});C="/drives/"+k+(c?"/items/"+c:"/root")+"/children";break;case "search":b=M;P=[{driveId:b,name:mxResources.get("back",null,"Back")}];n=encodeURIComponent(n.replace(/\'/g,"\\'"));C=b?"/drives/"+b+"/root/search(q='"+n+"')":"/me/drive/root/search(q='"+n+"')";break;default:null==c?P=[{driveId:b}]:P.push({name:m,driveId:b,folderId:c}),C=(b?"/drives/"+
+b:"/me/drive")+(c?"/items/"+c:"/root")+"/children"}q||(C+=(0<C.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");d(C,function(b){if(y){clearTimeout(t);b=b.value||[];for(var c=q?b:[],d=0;!q&&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)}p(c)}},function(b){if(y){clearTimeout(t);var c=null;try{c=JSON.parse(b.responseText).error.message}catch(ea){}f(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=c?" ("+c+")":""));Q=!1;E.stop()}})}}function C(b){W.className=W.className.replace("odCatSelected","");W=b;W.className+=" odCatSelected"}function D(b){Q||(Y=null,y("search",null,null,null,b))}var G="";null==e&&(e=A,G='<div style="text-align: center;" class="odPreview"></div>');
+null==g&&(g=function(){var b=null;try{b=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(aa){}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 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>'+G+(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>":""),F=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode(),F=".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 {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
+(F?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(F?"":"\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;}",
+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}),H=new Editor,I=null,L=null,M=null,Q=!1,P=[],K=null,X=null;this.getSelectedItem=function(){null!=L&&k(L);return L};if(null==u("#mxODPickerCss")){var J=document.head||document.getElementsByTagName("head")[0],N=document.createElement("style");J.appendChild(N);N.type="text/css";N.id="mxODPickerCss";N.appendChild(document.createTextNode(F))}b.innerHTML=
+G;var O=u(".odPreview"),W=u("#odFiles");b=function(b,c){c=c||document;return c.querySelectorAll(b)}(".odCatListTitle");for(G=0;G<b.length;G++)b[G].addEventListener("click",function(){L=X=null;if(!Q)switch(C(this),this.id){case "odFiles":y();break;case "odRecent":y("recent");break;case "odShared":y("shared");break;case "odSharepoint":y("sharepoint")}});var Y=null;u("#odSearchBox").addEventListener("keyup",function(b){var c=this;null!=Y&&clearTimeout(Y);13==b.keyCode?D(c.value):Y=setTimeout(function(){D(c.value)},
500)});u("#refreshOD").addEventListener("click",function(){null!=K&&(e(null),y.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")),P=t,y(m.driveId,m.folderId,m.siteId,m.name)):y()};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?
@@ -11505,10 +11506,10 @@ App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.mod
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(G){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=mxRectangle.fromRectangle(t),t.add(new mxRectangle((u.x+f.x)*v,(u.y+f.y)*v,
+function(b){try{n!=this.editor.graph&&null!=n.container.parentNode&&n.container.parentNode.removeChild(n.container)}catch(H){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=mxRectangle.fromRectangle(t),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 B=q.getContext("2d");B.scale(x,x);B.translate(-A,-z);var y=n.background;if(null==y||""==y||y==mxConstants.NONE)y="#ffffff";B.save();B.fillStyle=y;B.fillRect(A,z,Math.ceil(t.width+4),Math.ceil(t.height+4));B.restore();if(null!=f){var C=new Image;C.src=f.src;B.drawImage(C,f.x*x,f.y*
-x,f.width*x,f.height*x)}var E=new mxJsCanvas(q),H=new mxAsyncCanvas(this.thumbImageCache);E.images=this.thumbImageCache.images;var D=new mxImageExport;D.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())};D.drawText=function(b,c){};D.drawState(n.getView().getState(n.model.root),H);H.finish(mxUtils.bind(this,function(){try{D.drawState(n.getView().getState(n.model.root),E),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};
+x,f.width*x,f.height*x)}var D=new mxJsCanvas(q),G=new mxAsyncCanvas(this.thumbImageCache);D.images=this.thumbImageCache.images;var F=new mxImageExport;F.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())};F.drawText=function(b,c){};F.drawState(n.getView().getState(n.model.root),G);G.finish(mxUtils.bind(this,function(){try{F.drawState(n.getView().getState(n.model.root),D),n!=this.editor.graph&&null!=
+n.container.parentNode&&n.container.parentNode.removeChild(n.container)}catch(E){q=null}k(q)}));d=!0}}catch(E){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};
(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){}}})();
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!=
@@ -11716,13 +11717,13 @@ this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):th
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);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(H){c.handleError(H)}})}]];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,450,240,!0);g.init()}catch(G){c.handleError(G)}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(H){c.handleError(H)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",d);b.textarea.style.width=
+(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,450,240,!0);g.init()}catch(H){c.handleError(H)}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(E){c.handleError(E),null!=window.console&&console.error(E)}},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||
+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"),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";
@@ -11736,9 +11737,9 @@ mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show
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 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(G){mxLog.debug("Error: ",G.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(G){c.handleError(G),null!=window.console&&console.error(G)}});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(H){c.handleError(H)}},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(E){c.handleError(E)}}]]);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,
+f=c.getPagesForNode(e.documentElement,"mxGraphModel");if(null!=f&&0<f.length)try{var g=c.getHashValueForPages(f);mxLog.debug("Checksum: ",g)}catch(H){mxLog.debug("Error: ",H.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(H){c.handleError(H),null!=window.console&&console.error(H)}});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(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,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 m=e.restore;e.restore=function(){k--;m.apply(this,arguments)};var n=b.drawShape;b.drawShape=function(b){mxLog.debug("entering shape",
b,k);n.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,
@@ -11793,7 +11794,7 @@ null,null,App.MODE_BROWSER)},d);"1"!=urlParams.noDevice&&b.addItem(mxResources.g
"...)",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")+" ("+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"))},
+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(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=
@@ -11894,13 +11895,13 @@ d,e,n,f,l),mxUtils.bind(this,function(b){return this.isTreeEdge(b)}))};Graph.pro
!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,
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 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 F=[];v.traverse(x.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&F.push(c);(null==c||d)&&F.push(b);return null==c||d});v.moveCells(F,(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=
+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,y=l=e=0;y<q.length;y++){var u=v.model.getTerminal(q[y],!1);if(k==f(u)){var x=v.view.getState(u);u!=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(y=0;y<q.length;y++)if(u=v.model.getTerminal(q[y],!1),k==f(u)&&(x=v.view.getState(u),u!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY()))){var E=[];v.traverse(x.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&E.push(c);(null==c||d)&&E.push(b);return null==c||d});v.moveCells(E,(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 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(pa){}}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-
+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(pa){}}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),y=v.view.translate,u=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)/u-y.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)/u-y.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)/u-y.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||
c==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&v.setSelectionCell(e[d].cell)))))}var u=this,v=u.editor.graph,x=v.getModel(),A=u.menus.createPopupMenu;u.menus.createPopupMenu=function(c,d,e){A.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()&&
@@ -11911,13 +11912,13 @@ f;return z.apply(this,arguments)};u.hoverIcons.getStateAt=function(c,d,e){return
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 y=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 x=v.view.getState(n);null!=x&&(d=(x.getCenterX()-u.getCenterX())/v.view.scale,e=(x.getCenterY()-u.getCenterY())/v.view.scale)}}}}m=y.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 E={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()&&
+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)?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())),
-v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=E[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)||H.apply(this,arguments)};var D=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 D.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",
+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)||G.apply(this,arguments)};var F=v.connectVertex;v.connectVertex=function(c,d,e,g,k,n,q){var t=v.getIncomingTreeEdges(c);if(b(c)){var y=f(c),u=y==mxConstants.DIRECTION_EAST||y==mxConstants.DIRECTION_WEST,x=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return y==d||0==t.length?p(c,d):u==x?m(c):l(c,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return F.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 E=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){E.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",
"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 G=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){G.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var I=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){I.apply(this,
+this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(b)})))};var H=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){H.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 I=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){I.apply(this,
arguments);null!=this.moveHandle&&(this.moveHandle.style.display=b?"":"none")};var L=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(b,c){L.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;");
@@ -11982,49 +11983,49 @@ new ParseDialog(c,"Insert from Text");c.showDialog(b.container,620,420,!0,!1);b.
"...",function(){b(c)})).shortcut=c.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var b=new ParseDialog(c,mxResources.get("plantUml")+"...","plantUml");c.showDialog(b.container,620,420,!0,!1);b.init()}));c.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var b=new ParseDialog(c,mxResources.get("mermaid")+"...","mermaid");c.showDialog(b.container,620,420,!0,!1);
b.init()}));var g=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(b,c){var d=this.editorUi.editor.graph,e=d.getSelectionCell();g.call(this,b,e,null,c);this.addMenuItems(b,["editTooltip"],c);d.model.isVertex(e)&&this.addMenuItems(b,["editGeometry"],c);this.addMenuItems(b,["-","edit"],c)})));this.addPopupMenuCellEditItems=function(b,c,d,e){b.addSeparator();this.addSubmenu("editCell",b,e,mxResources.get("edit"))};this.put("diagram",new Menu(mxUtils.bind(this,function(b,
d){var e=c.getCurrentFile();c.menus.addSubmenu("extras",b,d,mxResources.get("preferences"));b.addSeparator(d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(b,"new open - synchronize - save saveAs -".split(" "),d):"1"==urlParams.embed?("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&c.menus.addMenuItems(b,["-","save"],d),("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&c.menus.addMenuItems(b,["saveAndExit"],d),b.addSeparator(d)):c.mode==
-App.MODE_ATLAS?c.menus.addMenuItems(b,["save","synchronize","-"],d):(c.menus.addMenuItems(b,["new"],d),c.menus.addSubmenu("openFrom",b,d),isLocalStorage&&this.addSubmenu("openRecent",b,d),"1"!=urlParams.sketch&&(b.addSeparator(d),null!=e&&e.constructor==DriveFile&&c.menus.addMenuItems(b,["share"],d),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||c.menus.addMenuItems(b,["synchronize"],d)),b.addSeparator(d),c.menus.addSubmenu("save",b,d));c.menus.addSubmenu("exportAs",
-b,d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(b,["import"],d):c.menus.addSubmenu("importFrom",b,d);"1"!=urlParams.sketch&&(c.menus.addMenuItems(b,["-","outline"],d),c.commentsSupported()&&c.menus.addMenuItems(b,["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&&"1"!=urlParams.embedInline&&
-(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?"1"!=urlParams.noExitBtn&&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);c.mode!=App.MODE_ATLAS&&(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 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);"1"!=urlParams.embedInline&&(this.addMenuItems(b,["toggleDarkMode"],d),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(b,["-","showStartScreen","search","scratchpad"],d),"1"==urlParams.sketch&&null==urlParams.pages&&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 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=!1;EditorUi.prototype.initFormatWindow=function(){if(!z){z=!0;this.formatWindow.window.setClosable(!1);var b=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){b.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()}))}};var B=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(b,c,d){var e=m.menus.get(b),f=t.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),q);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("+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?p.insertBefore(k,m.statusContainer):p.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),n.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?p.insertBefore(d,m.statusContainer):p.appendChild(d);return d}function k(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(W.style.left=58>O.offsetTop-O.offsetHeight/2?"70px":"10px");else{for(var b=p.firstChild;null!=b;){var e=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=e}q=p.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var b=1E3>d||"1"==urlParams.sketch,k=null;b||(k=c("diagram"));
-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?A: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([ea,ga],60),520<=d&&g([ma,640<=d?f("",ia.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ia,Editor.zoomInImage):null,640<=d?f("",U.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",U,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!=e&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?(null==la&&(e=t.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",p.appendChild(e),la=e),m.buttonContainer.style.paddingRight="34px"):(m.buttonContainer.style.paddingRight="4px",null!=la&&(la.parentNode.removeChild(la),la=null))}B.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?
-mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);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);("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch&&(this.initFormatWindow(),this.formatWindow.window.toggleMinimized()));var m=this,n=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));m.defaultLibraryName=
-mxResources.get("untitledLibrary");var p=document.createElement("div");p.className="geMenubarContainer";var q=null,t=new Menubar(m,p);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 u=m.hideCurrentMenu;m.hideCurrentMenu=function(){u.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
-var v=m.descriptorChanged;m.descriptorChanged=function(){v.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);p.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else p.removeAttribute("title")};m.setStatusText(m.editor.getStatus());p.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;";p.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,x=document.createElement("div");x.style.cssText=
-"position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";m.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var z=m.menus.get("viewZoom"),A="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,N="1"==urlParams.sketch?document.createElement("div"):null,O="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null,Y=mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(n.stylesheet.styles),
-this.sidebar.graph.defaultForegroundColor=n.defaultForegroundColor,this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));n.refresh();n.view.validateBackground()});m.addListener("darkModeChanged",Y);m.addListener("sketchModeChanged",Y);var ka=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)W.style.left="10px",W.style.top="10px",O.style.left="10px",O.style.top="60px",N.style.top="10px",N.style.right=
-"12px",N.style.left="",m.diagramContainer.setAttribute("data-bounds",m.diagramContainer.style.top+" "+m.diagramContainer.style.left+" "+m.diagramContainer.style.width+" "+m.diagramContainer.style.height),m.diagramContainer.style.top="0px",m.diagramContainer.style.left="0px",m.diagramContainer.style.bottom="0px",m.diagramContainer.style.right="0px",m.diagramContainer.style.width="",m.diagramContainer.style.height="";else{var b=m.diagramContainer.getAttribute("data-bounds");if(null!=b){m.diagramContainer.style.background=
-"transparent";m.diagramContainer.removeAttribute("data-bounds");var c=n.getGraphBounds(),b=b.split(" ");m.diagramContainer.style.top=b[0];m.diagramContainer.style.left=b[1];m.diagramContainer.style.width=c.width+50+"px";m.diagramContainer.style.height=c.height+46+"px";m.diagramContainer.style.bottom="";m.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:m.diagramContainer.getBoundingClientRect()}),"*");m.refresh()}W.style.left=m.diagramContainer.offsetLeft+
-"px";W.style.top=m.diagramContainer.offsetTop-W.offsetHeight-4+"px";O.style.display="";O.style.left=m.diagramContainer.offsetLeft-O.offsetWidth-4+"px";O.style.top=m.diagramContainer.offsetTop+"px";N.style.left=m.diagramContainer.offsetLeft+m.diagramContainer.offsetWidth-N.offsetWidth+"px";N.style.top=W.style.top;N.style.right="";m.bottomResizer.style.left=m.diagramContainer.offsetLeft+(m.diagramContainer.offsetWidth-m.bottomResizer.offsetWidth)/2+"px";m.bottomResizer.style.top=m.diagramContainer.offsetTop+
-m.diagramContainer.offsetHeight-m.bottomResizer.offsetHeight/2-1+"px";m.rightResizer.style.left=m.diagramContainer.offsetLeft+m.diagramContainer.offsetWidth-m.rightResizer.offsetWidth/2-1+"px";m.rightResizer.style.top=m.diagramContainer.offsetTop+(m.diagramContainer.offsetHeight-m.bottomResizer.offsetHeight)/2+"px"}m.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";m.rightResizer.style.visibility=m.bottomResizer.style.visibility;p.style.display="none";W.style.visibility="";N.style.visibility=
-""}),aa=mxUtils.bind(this,function(){ja.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";ka()}),Y=mxUtils.bind(this,function(){aa();b(m,!0);m.initFormatWindow();var c=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(c.x+c.width+4,c.y)});m.addListener("inlineFullscreenChanged",aa);m.addListener("editInlineStart",
-Y);"1"==urlParams.embedInline&&m.addListener("darkModeChanged",Y);m.addListener("editInlineStop",mxUtils.bind(this,function(b){m.diagramContainer.style.width="10px";m.diagramContainer.style.height="10px";m.diagramContainer.style.border="";m.bottomResizer.style.visibility="hidden";m.rightResizer.style.visibility="hidden";W.style.visibility="hidden";N.style.visibility="hidden";O.style.display="none"}));Graph.touchStyle&&(n.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==
-b.getState()&&!mxEvent.isMouseEvent(c)&&!n.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=m.hoverIcons){var ba=m.hoverIcons.update;m.hoverIcons.update=function(){n.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=n.freehand){var na=n.freehand.createStyle;n.freehand.createStyle=function(b){return na.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){O.className="geToolbarContainer";N.className="geToolbarContainer";
-W.className="geToolbarContainer";p.className="geToolbarContainer";m.picker=O;var pa=!1;mxEvent.addListener(p,"mouseenter",function(){m.statusContainer.style.display="inline-block"});mxEvent.addListener(p,"mouseleave",function(){pa||(m.statusContainer.style.display="none")});var fa=mxUtils.bind(this,function(b){null!=m.notificationBtn&&(null!=b?m.notificationBtn.setAttribute("title",b):m.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed?(p.style.visibility=14>p.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&&"function"===typeof m.statusContainer.firstChild.getAttribute&&null==m.statusContainer.firstChild.getAttribute("class")){var b=null!=m.statusContainer.firstChild&&"function"===typeof m.statusContainer.firstChild.getAttribute?m.statusContainer.firstChild.getAttribute("title"):m.editor.getStatus();fa(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",pa=!0):6<m.buttonContainer.clientWidth&&(m.statusContainer.style.display="none",pa=!1)}else m.statusContainer.style.display="inline-block",fa(null),pa=!0;p.style.visibility=12<p.clientWidth?"":"hidden"}))):m.editor.addListener("statusChanged",
-mxUtils.bind(this,function(){p.style.visibility=16<p.clientWidth?"":"hidden"}));S=c("diagram",null,Editor.menuImage);S.style.boxShadow="none";S.style.padding="6px";S.style.margin="0px";W.appendChild(S);mxEvent.disableContextMenu(S);mxEvent.addGestureListeners(S,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 ca=document.createElement("a");ca.style.padding="0px";ca.style.boxShadow="none";ca.className="geMenuItem";ca.style.display="inline-block";
-ca.style.width="40px";ca.style.height="12px";ca.style.marginBottom="-2px";ca.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";ca.style.backgroundPosition="top center";ca.style.backgroundRepeat="no-repeat";ca.setAttribute("title","Minimize");var R=!1,T=mxUtils.bind(this,function(){O.innerHTML="";if(!R){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;",
+App.MODE_ATLAS?c.menus.addMenuItems(b,["save","synchronize","-"],d):"1"!=urlParams.noFileMenu&&(c.menus.addMenuItems(b,["new"],d),c.menus.addSubmenu("openFrom",b,d),isLocalStorage&&this.addSubmenu("openRecent",b,d),"1"!=urlParams.sketch&&(b.addSeparator(d),null!=e&&e.constructor==DriveFile&&c.menus.addMenuItems(b,["share"],d),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||c.menus.addMenuItems(b,["synchronize"],d)),b.addSeparator(d),c.menus.addSubmenu("save",b,d));
+c.menus.addSubmenu("exportAs",b,d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(b,["import"],d):"1"!=urlParams.noFileMenu&&c.menus.addSubmenu("importFrom",b,d);"1"!=urlParams.sketch&&(c.menus.addMenuItems(b,["-","outline"],d),c.commentsSupported()&&c.menus.addMenuItems(b,["comments"],d));c.menus.addMenuItems(b,["-","findReplace","layers","tags"],d);c.menus.addMenuItems(b,["-","pageSetup","pageScale"],d);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(b,
+["print"],d);null!=e&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(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?"1"!=urlParams.noExitBtn&&c.menus.addMenuItems(b,["-","exit"],d):"1"!=urlParams.noFileMenu&&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);c.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(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 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&&"1"!=urlParams.extAuth&&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);"1"!=urlParams.embedInline&&(this.addMenuItems(b,["toggleDarkMode"],d),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(b,["-","showStartScreen","search","scratchpad"],d),"1"==urlParams.sketch&&null==urlParams.pages&&
+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 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=!1;EditorUi.prototype.initFormatWindow=function(){if(!z){z=!0;this.formatWindow.window.setClosable(!1);var b=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){b.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()}))}};var B=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(b,c,d){var e=m.menus.get(b),
+f=t.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),q);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("+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?p.insertBefore(k,m.statusContainer):p.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),n.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?p.insertBefore(d,m.statusContainer):p.appendChild(d);return d}function k(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(W.style.left=58>O.offsetTop-O.offsetHeight/2?"70px":"10px");else{for(var b=p.firstChild;null!=b;){var e=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=e}q=p.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
+var b=1E3>d||"1"==urlParams.sketch,k=null;b||(k=c("diagram"));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?A: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([ea,ga],60),520<=d&&g([ma,640<=d?f("",ia.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ia,Editor.zoomInImage):null,640<=d?f("",U.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",U,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!=e&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?(null==la&&(e=t.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",p.appendChild(e),la=e),m.buttonContainer.style.paddingRight="34px"):(m.buttonContainer.style.paddingRight="4px",null!=la&&(la.parentNode.removeChild(la),la=null))}B.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:
+null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);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);("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch&&(this.initFormatWindow(),this.formatWindow.window.toggleMinimized()));var m=this,n=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));
+m.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.className="geMenubarContainer";var q=null,t=new Menubar(m,p);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 u=m.hideCurrentMenu;m.hideCurrentMenu=function(){u.apply(this,
+arguments);this.editor.graph.popupMenuHandler.hideMenu()};var v=m.descriptorChanged;m.descriptorChanged=function(){v.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);p.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else p.removeAttribute("title")};m.setStatusText(m.editor.getStatus());p.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;";p.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,x=document.createElement("div");x.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";m.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var z=m.menus.get("viewZoom"),A="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,N="1"==urlParams.sketch?document.createElement("div"):null,O="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null,Y=mxUtils.bind(this,
+function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(n.stylesheet.styles),this.sidebar.graph.defaultForegroundColor=n.defaultForegroundColor,this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));n.refresh();n.view.validateBackground()});m.addListener("darkModeChanged",Y);m.addListener("sketchModeChanged",Y);var ka=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)W.style.left=
+"10px",W.style.top="10px",O.style.left="10px",O.style.top="60px",N.style.top="10px",N.style.right="12px",N.style.left="",m.diagramContainer.setAttribute("data-bounds",m.diagramContainer.style.top+" "+m.diagramContainer.style.left+" "+m.diagramContainer.style.width+" "+m.diagramContainer.style.height),m.diagramContainer.style.top="0px",m.diagramContainer.style.left="0px",m.diagramContainer.style.bottom="0px",m.diagramContainer.style.right="0px",m.diagramContainer.style.width="",m.diagramContainer.style.height=
+"";else{var b=m.diagramContainer.getAttribute("data-bounds");if(null!=b){m.diagramContainer.style.background="transparent";m.diagramContainer.removeAttribute("data-bounds");var c=n.getGraphBounds(),b=b.split(" ");m.diagramContainer.style.top=b[0];m.diagramContainer.style.left=b[1];m.diagramContainer.style.width=c.width+50+"px";m.diagramContainer.style.height=c.height+46+"px";m.diagramContainer.style.bottom="";m.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
+rect:m.diagramContainer.getBoundingClientRect()}),"*");m.refresh()}W.style.left=m.diagramContainer.offsetLeft+"px";W.style.top=m.diagramContainer.offsetTop-W.offsetHeight-4+"px";O.style.display="";O.style.left=m.diagramContainer.offsetLeft-O.offsetWidth-4+"px";O.style.top=m.diagramContainer.offsetTop+"px";N.style.left=m.diagramContainer.offsetLeft+m.diagramContainer.offsetWidth-N.offsetWidth+"px";N.style.top=W.style.top;N.style.right="";m.bottomResizer.style.left=m.diagramContainer.offsetLeft+(m.diagramContainer.offsetWidth-
+m.bottomResizer.offsetWidth)/2+"px";m.bottomResizer.style.top=m.diagramContainer.offsetTop+m.diagramContainer.offsetHeight-m.bottomResizer.offsetHeight/2-1+"px";m.rightResizer.style.left=m.diagramContainer.offsetLeft+m.diagramContainer.offsetWidth-m.rightResizer.offsetWidth/2-1+"px";m.rightResizer.style.top=m.diagramContainer.offsetTop+(m.diagramContainer.offsetHeight-m.bottomResizer.offsetHeight)/2+"px"}m.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";m.rightResizer.style.visibility=
+m.bottomResizer.style.visibility;p.style.display="none";W.style.visibility="";N.style.visibility=""}),aa=mxUtils.bind(this,function(){ja.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";ka()}),Y=mxUtils.bind(this,function(){aa();b(m,!0);m.initFormatWindow();var c=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(c.x+
+c.width+4,c.y)});m.addListener("inlineFullscreenChanged",aa);m.addListener("editInlineStart",Y);"1"==urlParams.embedInline&&m.addListener("darkModeChanged",Y);m.addListener("editInlineStop",mxUtils.bind(this,function(b){m.diagramContainer.style.width="10px";m.diagramContainer.style.height="10px";m.diagramContainer.style.border="";m.bottomResizer.style.visibility="hidden";m.rightResizer.style.visibility="hidden";W.style.visibility="hidden";N.style.visibility="hidden";O.style.display="none"}));Graph.touchStyle&&
+(n.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!n.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=m.hoverIcons){var ba=m.hoverIcons.update;m.hoverIcons.update=function(){n.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=n.freehand){var na=n.freehand.createStyle;n.freehand.createStyle=function(b){return na.apply(this,arguments)+"sketch=0;"}}if("1"==
+urlParams.sketch){O.className="geToolbarContainer";N.className="geToolbarContainer";W.className="geToolbarContainer";p.className="geToolbarContainer";m.picker=O;var pa=!1;mxEvent.addListener(p,"mouseenter",function(){m.statusContainer.style.display="inline-block"});mxEvent.addListener(p,"mouseleave",function(){pa||(m.statusContainer.style.display="none")});var fa=mxUtils.bind(this,function(b){null!=m.notificationBtn&&(null!=b?m.notificationBtn.setAttribute("title",b):m.notificationBtn.removeAttribute("title"))});
+"1"!=urlParams.embed?(p.style.visibility=14>p.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&&"function"===typeof m.statusContainer.firstChild.getAttribute&&null==m.statusContainer.firstChild.getAttribute("class")){var b=null!=m.statusContainer.firstChild&&"function"===typeof m.statusContainer.firstChild.getAttribute?m.statusContainer.firstChild.getAttribute("title"):
+m.editor.getStatus();fa(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",pa=!0):6<m.buttonContainer.clientWidth&&(m.statusContainer.style.display="none",pa=!1)}else m.statusContainer.style.display="inline-block",fa(null),pa=!0;p.style.visibility=12<p.clientWidth?"":
+"hidden"}))):m.editor.addListener("statusChanged",mxUtils.bind(this,function(){p.style.visibility=16<p.clientWidth?"":"hidden"}));S=c("diagram",null,Editor.menuImage);S.style.boxShadow="none";S.style.padding="6px";S.style.margin="0px";W.appendChild(S);mxEvent.disableContextMenu(S);mxEvent.addGestureListeners(S,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 ca=document.createElement("a");ca.style.padding="0px";ca.style.boxShadow=
+"none";ca.className="geMenuItem";ca.style.display="inline-block";ca.style.width="40px";ca.style.height="12px";ca.style.marginBottom="-2px";ca.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";ca.style.backgroundPosition="top center";ca.style.backgroundRepeat="no-repeat";ca.setAttribute("title","Minimize");var R=!1,T=mxUtils.bind(this,function(){O.innerHTML="";if(!R){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,n.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=n.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+
@@ -12047,14 +12048,14 @@ l.style.position="absolute";l.style.width="10px";l.style.height="10px";l.style.b
m.rightResizer=l;mxEvent.addGestureListeners(l,function(b){va=parseInt(m.diagramContainer.style.width);qa=mxEvent.getClientX(b);n.popupMenuHandler.hideMenu();mxEvent.consume(b)});mxEvent.addGestureListeners(document.body,null,function(b){var c=!1;null!=qa&&(m.diagramContainer.style.width=Math.max(20,va+mxEvent.getClientX(b)-qa)+"px",c=!0);null!=ta&&(m.diagramContainer.style.height=Math.max(20,xa+mxEvent.getClientY(b)-ta)+"px",c=!0);c&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
fullscreen:Editor.inlineFullscreen,rect:m.diagramContainer.getBoundingClientRect()}),"*"),m.fireEvent(new mxEventObject("editInlineStart")),m.refresh())},function(b){null==qa&&null==ta||mxEvent.consume(b);ta=qa=null});n.defaultPageBackgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";m.bottomResizer.style.visibility="hidden";m.rightResizer.style.visibility="hidden";W.style.visibility="hidden";N.style.visibility="hidden";O.style.display=
"none"}"1"==urlParams.prefetchFonts&&m.editor.loadFonts()}}};(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 B=this.states[z];B instanceof mxCellState&&(n||!this.graph.isCellSelected(B.cell))&&((t.x>=B.x&&t.x<=B.x+B.width||B.x>=t.x&&B.x<=t.x+t.width)&&(t.y>
-B.y+B.height+4||t.y+t.height+4<B.y)?x.push(B):(t.y>=B.y&&t.y<=B.y+B.height||B.y>=t.y&&B.y<=t.y+t.height)&&(t.x>B.x+B.width+4||t.x+t.width+4<B.x)&&A.push(B))}var y=0,C=0,E=B=0,H=0,D=0,F=0,G=0,I=5*u;if(1<x.length){x.push(t);x.sort(function(b,c){return b.y-c.y});var L=!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];B=C=E=(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],Q=t==u||t==M,M=M.y-u.y-u.height,L=L|t==u;if(0==C&&
-0==y)C=M,y=1;else if(Math.abs(C-M)<=(Q||1==z&&L?v:0))y+=1;else if(1<y&&L){x=x.slice(0,z+1);break}else if(3<=x.length-z&&!L)y=0,B=C=0!=E?E:0,x.splice(0,0==z?1:z),z=-1;else break;0!=B||Q||(C=B=M)}3==x.length&&x[1]==t&&(B=0)}if(1<A.length){A.push(t);A.sort(function(b,c){return b.x-c.x});L=!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=D=G=(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];Q=t==u||t==M;M=M.x-u.x-u.width;L|=t==
-u;if(0==D&&0==H)D=M,H=1;else if(Math.abs(D-M)<=(Q||1==z&&L?v:0))H+=1;else if(1<H&&L){A=A.slice(0,z+1);break}else if(3<=A.length-z&&!L)H=0,F=D=0!=G?G:0,A.splice(0,0==z?1:z),z=-1;else break;0!=F||Q||(D=F=M)}3==A.length&&A[1]==t&&(F=0)}v=function(b,c,d,e){var f=[],g;e?(e=I,g=0):(e=0,g=I);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};D=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<H&&H==A.length-1){H=[];G=q.guidesArrHor;k=[];g=0;z=A[0]==t?1:0;L=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+I,L)),k.push(new mxPoint(M.x-I,L))):t==M?(k.push(new mxPoint(u.x+u.width+I,L)),g=u.x+u.width+F,k.push(new mxPoint(g-I,L))):(k.push(new mxPoint(u.x+u.width+I,L)),k.push(new mxPoint(M.x-I,L)));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+I,L)),k.push(new mxPoint(g-I,L)),k.push(new mxPoint(g+t.width+I,L)),k.push(new mxPoint(z.x-I,L));for(z=0;z<k.length;z+=2)A=k[z],F=k[z+1],A=v(A,F,null!=G?
-G[z/2]:null),A.node.style.visibility="visible",A.redraw(),H.push(A);for(z=k.length/2;null!=G&&z<G.length;z++)G[z].destroy();q.guidesArrHor=H;g-=c.x;k=!0}else D(!0);if(1<y&&y==x.length-1){H=[];G=q.guidesArrVer;p=[];f=0;z=x[0]==t?1:0;y=x[z].x+x[z].width;if(0<B)for(z=0;z<x.length-1;z++)u=x[z],M=x[z+1],t==u?(f=M.y-u.height-B,p.push(new mxPoint(y,f+u.height+I)),p.push(new mxPoint(y,M.y-I))):t==M?(p.push(new mxPoint(y,u.y+u.height+I)),f=u.y+u.height+B,p.push(new mxPoint(y,f-I))):(p.push(new mxPoint(y,u.y+
-u.height+I)),p.push(new mxPoint(y,M.y-I)));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(y,u.y+u.height+I)),p.push(new mxPoint(y,f-I)),p.push(new mxPoint(y,f+t.height+I)),p.push(new mxPoint(y,z.y-I));for(z=0;z<p.length;z+=2)A=p[z],F=p[z+1],A=v(A,F,null!=G?G[z/2]:null,!0),A.node.style.visibility="visible",A.redraw(),H.push(A);for(z=p.length/2;null!=G&&z<G.length;z++)G[z].destroy();q.guidesArrVer=H;f-=c.y;p=!0}else D(!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;D(!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!=
+B.y+B.height+4||t.y+t.height+4<B.y)?x.push(B):(t.y>=B.y&&t.y<=B.y+B.height||B.y>=t.y&&B.y<=t.y+t.height)&&(t.x>B.x+B.width+4||t.x+t.width+4<B.x)&&A.push(B))}var y=0,C=0,D=B=0,G=0,F=0,E=0,H=0,I=5*u;if(1<x.length){x.push(t);x.sort(function(b,c){return b.y-c.y});var L=!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];B=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],Q=t==u||t==M,M=M.y-u.y-u.height,L=L|t==u;if(0==C&&
+0==y)C=M,y=1;else if(Math.abs(C-M)<=(Q||1==z&&L?v:0))y+=1;else if(1<y&&L){x=x.slice(0,z+1);break}else if(3<=x.length-z&&!L)y=0,B=C=0!=D?D:0,x.splice(0,0==z?1:z),z=-1;else break;0!=B||Q||(C=B=M)}3==x.length&&x[1]==t&&(B=0)}if(1<A.length){A.push(t);A.sort(function(b,c){return b.x-c.x});L=!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=F=H=(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];Q=t==u||t==M;M=M.x-u.x-u.width;L|=t==
+u;if(0==F&&0==G)F=M,G=1;else if(Math.abs(F-M)<=(Q||1==z&&L?v:0))G+=1;else if(1<G&&L){A=A.slice(0,z+1);break}else if(3<=A.length-z&&!L)G=0,E=F=0!=H?H:0,A.splice(0,0==z?1:z),z=-1;else break;0!=E||Q||(F=E=M)}3==A.length&&A[1]==t&&(E=0)}v=function(b,c,d,e){var f=[],g;e?(e=I,g=0):(e=0,g=I);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};F=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=[];H=q.guidesArrHor;k=[];g=0;z=A[0]==t?1:0;L=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+I,L)),k.push(new mxPoint(M.x-I,L))):t==M?(k.push(new mxPoint(u.x+u.width+I,L)),g=u.x+u.width+E,k.push(new mxPoint(g-I,L))):(k.push(new mxPoint(u.x+u.width+I,L)),k.push(new mxPoint(M.x-I,L)));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+I,L)),k.push(new mxPoint(g-I,L)),k.push(new mxPoint(g+t.width+I,L)),k.push(new mxPoint(z.x-I,L));for(z=0;z<k.length;z+=2)A=k[z],E=k[z+1],A=v(A,E,null!=H?
+H[z/2]:null),A.node.style.visibility="visible",A.redraw(),G.push(A);for(z=k.length/2;null!=H&&z<H.length;z++)H[z].destroy();q.guidesArrHor=G;g-=c.x;k=!0}else F(!0);if(1<y&&y==x.length-1){G=[];H=q.guidesArrVer;p=[];f=0;z=x[0]==t?1:0;y=x[z].x+x[z].width;if(0<B)for(z=0;z<x.length-1;z++)u=x[z],M=x[z+1],t==u?(f=M.y-u.height-B,p.push(new mxPoint(y,f+u.height+I)),p.push(new mxPoint(y,M.y-I))):t==M?(p.push(new mxPoint(y,u.y+u.height+I)),f=u.y+u.height+B,p.push(new mxPoint(y,f-I))):(p.push(new mxPoint(y,u.y+
+u.height+I)),p.push(new mxPoint(y,M.y-I)));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(y,u.y+u.height+I)),p.push(new mxPoint(y,f-I)),p.push(new mxPoint(y,f+t.height+I)),p.push(new mxPoint(y,z.y-I));for(z=0;z<p.length;z+=2)A=p[z],E=p[z+1],A=v(A,E,null!=H?H[z/2]:null,!0),A.node.style.visibility="visible",A.redraw(),G.push(A);for(z=p.length/2;null!=H&&z<H.length;z++)H[z].destroy();q.guidesArrVer=G;f-=c.y;p=!0}else F(!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;F(!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:Editor.darkColor,cornerClr:Editor.darkColor,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:Editor.darkColor,cornerClr:Editor.darkColor,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=
@@ -12078,8 +12079,8 @@ function(b){x=b};this.setSmoothing=function(b){d=b};var A=function(c){v=c;b.getR
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 B=new mxCell;B.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(B),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=y(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=y(g);C(g);var l=E(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=E(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())&&
-(z(e.getEvent()),e.consume())})});var y=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()},E=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;
+e=c.getProperty("event");d==mxEvent.MOUSE_MOVE&&v&&(null!=e.sourceState&&e.sourceState.setCursor("crosshair"),e.consume())}));var B=new mxCell;B.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(B),p=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),p=Math.max(1,p*b.view.scale),m=mxUtils.getValue(b.currentVertexStyle,
+mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(m,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==m&&(m=b.defaultForegroundColor);c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill","none");c.setAttribute("stroke",m);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=y(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=y(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())&&(z(e.getEvent()),e.consume())})});var y=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/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index 0dbc1a4b..4c717209 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -3884,7 +3884,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
}
if (!compact && urlParams['embed'] != '1' && !createOnly &&
- !mxClient.IS_ANDROID && !mxClient.IS_IOS)
+ !mxClient.IS_ANDROID && !mxClient.IS_IOS && urlParams['noDevice'] != '1')
{
var fromTmpBtn = mxUtils.button(mxResources.get('fromTemplateUrl'), function()
{
@@ -4024,7 +4024,7 @@ var CreateDialog = function(editorUi, title, createFn, cancelFn, dlgTitle, btnLa
var copyBtn = null;
// Disables SVG preview if SVG is not supported in browser
- if (data != null && mimeType != null && (mimeType.substring(0, 6) == 'image/' &&
+ if (urlParams['noDevice'] != '1' && data != null && mimeType != null && (mimeType.substring(0, 6) == 'image/' &&
(mimeType.substring(0, 9) != 'image/svg' || mxClient.IS_SVG)))
{
nameInput.style.width = '160px';
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index 47014047..951c8c5e 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -3722,6 +3722,7 @@
Format.inactiveTabBackgroundColor = 'black';
Graph.prototype.defaultThemeName = 'darkTheme';
Graph.prototype.defaultPageBackgroundColor = Editor.darkColor;
+ Graph.prototype.defaultForegroundColor = '#f0f0f0';
Graph.prototype.defaultPageBorderColor = '#505759';
BaseFormatPanel.prototype.buttonBackgroundColor = Editor.darkColor;
mxGraphHandler.prototype.previewColor = '#cccccc';
@@ -4087,6 +4088,17 @@
return this.editor.graph.openLink(e.helpLink);
});
}
+ else if (e != null && e.ownerEmail != null)
+ {
+ btn3 = mxResources.get('contactOwner');
+
+ msg += mxUtils.htmlEntities(' (' + btn3 + ': ' + e.ownerEmail + ')');
+
+ fn3 = mxUtils.bind(this, function()
+ {
+ return this.openLink('mailto:' + mxUtils.htmlEntities(e.ownerEmail));
+ });
+ }
this.showError(title, msg, btn, fn, retry, null, null, btn3, fn3,
null, null, null, (invokeFnOnClose) ? fn : null);
@@ -12036,6 +12048,10 @@
return;
}
+ else if (data.action == 'exit')
+ {
+ this.actions.get('exit').funct();
+ }
else if (data.action == 'export')
{
if (data.format == 'png' || data.format == 'xmlpng')
diff --git a/src/main/webapp/js/diagramly/Init.js b/src/main/webapp/js/diagramly/Init.js
index aebba7dc..8e2bc939 100644
--- a/src/main/webapp/js/diagramly/Init.js
+++ b/src/main/webapp/js/diagramly/Init.js
@@ -178,6 +178,16 @@ if (window.mxLanguages == null)
}
}
+//Disable Google Drive when running in a WebView (e.g, MS Teams App) Since auth doesn't work with disallowd_useragent
+if (/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent))
+{
+ urlParams['gapi'] = '0';
+ urlParams['noDevice'] = '1';
+ //Force viewer only
+ urlParams['lightbox'] = '1';
+ urlParams['layers'] = '1';
+}
+
// Uses lightbox mode on viewer domain
if (window.location.hostname == DRAWIO_LIGHTBOX_URL.substring(DRAWIO_LIGHTBOX_URL.indexOf('//') + 2))
{
@@ -207,6 +217,12 @@ window.uiTheme = window.uiTheme || (function()
{
var ui = urlParams['ui'];
+ //Use Sketch theme for MS Teams (and any future extAuth) by default
+ if (urlParams['extAuth'] == '1')
+ {
+ ui = 'sketch';
+ }
+
// Known issue: No JSON object at this point in quirks in IE8
if (ui == null && isLocalStorage && typeof JSON !== 'undefined' && urlParams['lightbox'] != '1')
{
@@ -227,12 +243,6 @@ window.uiTheme = window.uiTheme || (function()
}
}
- //Use Sketch theme for MS Teams (and any future extAuth) by default
- if (ui == null && urlParams['extAuth'] == '1')
- {
- ui = 'sketch';
- }
-
// Uses minimal theme on small screens
try
{
@@ -420,13 +430,6 @@ if (window.location.hostname == 'embed.diagrams.net')
urlParams['embed'] = '1';
}
-//Disable Google Drive when running in a WebView (e.g, MS Teams App) Since auth doesn't work with disallowd_useragent
-if (/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent))
-{
- urlParams['gapi'] = '0';
- urlParams['noDevice'] = '1';
-}
-
// Fallback for cases where the hash property is not available
if ((window.location.hash == null || window.location.hash.length <= 1) &&
urlParams['open'] != null)
diff --git a/src/main/webapp/js/diagramly/Minimal.js b/src/main/webapp/js/diagramly/Minimal.js
index 5862fc41..d55c4e0c 100644
--- a/src/main/webapp/js/diagramly/Minimal.js
+++ b/src/main/webapp/js/diagramly/Minimal.js
@@ -1070,7 +1070,7 @@ EditorUi.initMinimalTheme = function()
{
ui.menus.addMenuItems(menu, ['save', 'synchronize', '-'], parent);
}
- else
+ else if (urlParams['noFileMenu'] != '1')
{
ui.menus.addMenuItems(menu, ['new'], parent);
ui.menus.addSubmenu('openFrom', menu, parent);
@@ -1106,7 +1106,7 @@ EditorUi.initMinimalTheme = function()
{
ui.menus.addMenuItems(menu, ['import'], parent);
}
- else
+ else if (urlParams['noFileMenu'] != '1')
{
ui.menus.addSubmenu('importFrom', menu, parent);
}
@@ -1126,7 +1126,7 @@ EditorUi.initMinimalTheme = function()
ui.menus.addMenuItems(menu, ['-', 'pageSetup', 'pageScale'], parent);
// Cannot use print in standalone mode on iOS as we cannot open new windows
- if (!mxClient.IS_IOS || !navigator.standalone)
+ if (urlParams['noFileMenu'] != '1' && (!mxClient.IS_IOS || !navigator.standalone))
{
ui.menus.addMenuItems(menu, ['print'], parent);
}
@@ -1153,7 +1153,7 @@ EditorUi.initMinimalTheme = function()
ui.menus.addMenuItems(menu, ['-', 'exit'], parent);
}
}
- else
+ else if (urlParams['noFileMenu'] != '1')
{
ui.menus.addMenuItems(menu, ['-', 'close']);
}
@@ -1213,12 +1213,11 @@ EditorUi.initMinimalTheme = function()
ui.menus.addMenuItems(menu, ['publishLink'], parent);
}
- if(ui.mode != App.MODE_ATLAS)
+ if (ui.mode != App.MODE_ATLAS && urlParams['extAuth'] != '1')
{
menu.addSeparator(parent);
ui.menus.addSubmenu('embed', menu, parent);
}
-
})));
var langMenu = this.get('language');
@@ -1254,7 +1253,7 @@ EditorUi.initMinimalTheme = function()
// Extras menu is labelled preferences but keeps ID for extensions
this.put('extras', new Menu(mxUtils.bind(this, function(menu, parent)
{
- if (urlParams['embed'] != '1')
+ if (urlParams['embed'] != '1' && urlParams['extAuth'] != '1')
{
ui.menus.addSubmenu('theme', menu, parent);
}
diff --git a/src/main/webapp/js/diagramly/OneDriveClient.js b/src/main/webapp/js/diagramly/OneDriveClient.js
index 4b14fdaf..2bb109dd 100644
--- a/src/main/webapp/js/diagramly/OneDriveClient.js
+++ b/src/main/webapp/js/diagramly/OneDriveClient.js
@@ -171,7 +171,7 @@ OneDriveClient.prototype.updateUser = function(success, error, failOnAuth)
else
{
var data = JSON.parse(req.getText());
- this.setUser(new DrawioUser(data.id, null, data.displayName));
+ this.setUser(new DrawioUser(data.id, data.mail, data.displayName));
success();
}
}
@@ -721,8 +721,8 @@ OneDriveClient.prototype.getFile = function(id, success, error, denyConvert, asL
{
if (this.isExtAuth)
{
- error({message: mxResources.get('fileNotFoundOrDenied') +
- (this.user != null ? ' (' + this.user.displayName + ')' : '')});
+ error({message: mxResources.get('fileNotFoundOrDenied'),
+ ownerEmail: window.urlParams != null? urlParams['ownerEml'] : null});
}
else
{
@@ -1296,8 +1296,6 @@ OneDriveClient.prototype.createInlinePicker = function(fn, foldersOnly)
{
var odPicker = null;
var div = document.createElement('div');
- div.style.width = '550px';
- div.style.height = '435px';
div.style.position = 'relative';
var dlg = new CustomDialog(this.ui, div, mxUtils.bind(this, function()
@@ -1324,6 +1322,9 @@ OneDriveClient.prototype.createInlinePicker = function(fn, foldersOnly)
}), null, mxResources.get(foldersOnly? 'save' :'open'), null, null, null, null, true);
this.ui.showDialog(dlg.container, 550, 500, true, true);
+ //Set width/height of the picker container
+ div.style.width = dlg.container.parentNode.style.width;
+ div.style.height = (parseInt(dlg.container.parentNode.style.height) - 60) + 'px';
odPicker = new mxODPicker(div, null, mxUtils.bind(this, function(url, success, error)
{
diff --git a/src/main/webapp/js/diagramly/mxFreehand.js b/src/main/webapp/js/diagramly/mxFreehand.js
index 8604b642..1408df2c 100644
--- a/src/main/webapp/js/diagramly/mxFreehand.js
+++ b/src/main/webapp/js/diagramly/mxFreehand.js
@@ -275,10 +275,17 @@ function mxFreehand(graph)
var defaultStyle = graph.getCurrentCellStyle(edge);
var strokeWidth = parseFloat(graph.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH] || 1);
strokeWidth = Math.max(1, strokeWidth * graph.view.scale);
+ var strokeColor = mxUtils.getValue(graph.currentVertexStyle, mxConstants.STYLE_STROKECOLOR,
+ mxUtils.getValue(defaultStyle, mxConstants.STYLE_STROKECOLOR, '#000'))
+
+ if (strokeColor == 'default')
+ {
+ strokeColor = graph.defaultForegroundColor;
+ }
+
path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
path.setAttribute('fill', 'none');
- path.setAttribute('stroke', mxUtils.getValue(graph.currentVertexStyle, mxConstants.STYLE_STROKECOLOR,
- mxUtils.getValue(defaultStyle, mxConstants.STYLE_STROKECOLOR, '#000')));
+ path.setAttribute('stroke', strokeColor);
path.setAttribute('stroke-width', strokeWidth);
if (graph.currentVertexStyle[mxConstants.STYLE_DASHED] == '1')
diff --git a/src/main/webapp/js/grapheditor/Editor.js b/src/main/webapp/js/grapheditor/Editor.js
index 75f67b7c..70b57855 100644
--- a/src/main/webapp/js/grapheditor/Editor.js
+++ b/src/main/webapp/js/grapheditor/Editor.js
@@ -202,7 +202,7 @@ Editor.fitWindowBorders = null;
* Specifies if the diagram should be saved automatically if possible. Default
* is true.
*/
-Editor.popupsAllowed = true;
+Editor.popupsAllowed = window.urlParams != null? urlParams['noDevice'] != '1' : true;
/**
* Specifies if the html and whiteSpace styles should be removed on inserted cells.
diff --git a/src/main/webapp/js/grapheditor/Sidebar.js b/src/main/webapp/js/grapheditor/Sidebar.js
index 3cdb859f..ee4192ce 100644
--- a/src/main/webapp/js/grapheditor/Sidebar.js
+++ b/src/main/webapp/js/grapheditor/Sidebar.js
@@ -2166,12 +2166,11 @@ Sidebar.prototype.createItem = function(cells, title, showLabel, showTitle, widt
// Applies default styles
var originalCells = cells;
cells = this.graph.cloneCells(cells);
- this.editorUi.insertHandler(originalCells, null, this.graph.model,
- this.editorUi.editor.graph.defaultVertexStyle,
- this.editorUi.editor.graph.defaultEdgeStyle,
- true, true);
+ this.editorUi.insertHandler(originalCells, null,
+ this.graph.model, null, null, true, true);
- this.createThumb(originalCells, this.thumbWidth, this.thumbHeight, elt, title, showLabel, showTitle, width, height);
+ this.createThumb(originalCells, this.thumbWidth, this.thumbHeight,
+ elt, title, showLabel, showTitle, width, height);
var bounds = new mxRectangle(0, 0, width, height);
if (cells.length > 1 || cells[0].vertex)
diff --git a/src/main/webapp/js/onedrive/mxODPicker.js b/src/main/webapp/js/onedrive/mxODPicker.js
index 6b961580..cd157b5c 100644
--- a/src/main/webapp/js/onedrive/mxODPicker.js
+++ b/src/main/webapp/js/onedrive/mxODPicker.js
@@ -151,13 +151,18 @@ function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRece
' overflow-y: auto;' +
'}' +
'.odFileImg {' +
+ ' width: 24px;' +
' padding-left: 5px;' +
' padding-right: 5px;' +
'}' +
'.odFileTitle {' +
' cursor: default;' +
' font-weight: normal;' +
- ' color: #666666 !important;' +
+ ' color: #666666 !important;' +
+ ' width: calc(100% - 20px);' +
+ ' white-space: nowrap;' +
+ ' overflow: hidden;' +
+ ' text-overflow: ellipsis;' +
'}' +
'.odFileListGrid {' +
' width: 100%;' +
@@ -528,7 +533,6 @@ function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRece
var title = item.displayName || item.name;
var tooltip = mxUtils.htmlEntities(item.description || title);
- var titleLimit = Math.round(container.clientWidth * 0.7 / 10);
if (isSharepointSites)
{
@@ -545,21 +549,19 @@ function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRece
var row = document.createElement('tr');
row.className = (count++) % 2? 'odOddRow' : 'odEvenRow';
var td = document.createElement('td');
- td.style.width = "24px";
+ td.style.width = '36px';
var typeImg = document.createElement('img');
typeImg.src = '/images/' + (isFolder? 'folder.png' : 'file.png');
typeImg.className = 'odFileImg';
- typeImg.width = 24;
td.appendChild(typeImg);
row.appendChild(td);
td = document.createElement('td');
- var titleSpan = document.createElement('span');
- titleSpan.className = "odFileTitle";
- titleSpan.innerHTML = (title != null && title.length > titleLimit)?
- mxUtils.htmlEntities(title.substring(0, titleLimit)) + '&hellip;' : mxUtils.htmlEntities(title);
- titleSpan.setAttribute('title', tooltip);
- td.appendChild(titleSpan);
+ var titleDiv = document.createElement('div');
+ titleDiv.className = "odFileTitle";
+ titleDiv.innerHTML = mxUtils.htmlEntities(title);
+ titleDiv.setAttribute('title', tooltip);
+ td.appendChild(titleDiv);
row.appendChild(td);
grid.appendChild(row);
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 77e20382..4e95a05b 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -192,16 +192,16 @@ window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=n
window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;
window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null);if(!a&&window.mxIsElectron&&(a=require("@electron/remote").app.getLocale(),null!=a)){var c=a.indexOf("-");0<=c&&(a=a.substring(0,c));a=a.toLowerCase()}}catch(d){isLocalStorage=!1}return a}();
window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",eu:"Euskara",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",
-he:"עברית",ar:"العربية",fa:"فارسی",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph",window.mxImageBasePath="mxgraph/images");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}window.location.hostname==DRAWIO_LIGHTBOX_URL.substring(DRAWIO_LIGHTBOX_URL.indexOf("//")+2)&&(urlParams.lightbox="1");"1"==urlParams.lightbox&&(urlParams.chrome="0");
-"1"==urlParams.embedInline&&(urlParams.embed="1",urlParams.ui="sketch",urlParams.plugins="0",urlParams.proto="json",urlParams.prefetchFonts="1");
-window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&isLocalStorage&&"undefined"!==typeof JSON&&"1"!=urlParams.lightbox)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}null==a&&"1"==urlParams.extAuth&&(a="sketch");try{null==a&&768>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null==urlParams.pages&&(urlParams.pages="1"),a="sketch")}catch(c){}"sketch"==a&&(urlParams.sketch=
-"1",a="min");return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
+he:"עברית",ar:"العربية",fa:"فارسی",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph",window.mxImageBasePath="mxgraph/images");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1",urlParams.lightbox="1",urlParams.layers="1");
+window.location.hostname==DRAWIO_LIGHTBOX_URL.substring(DRAWIO_LIGHTBOX_URL.indexOf("//")+2)&&(urlParams.lightbox="1");"1"==urlParams.lightbox&&(urlParams.chrome="0");"1"==urlParams.embedInline&&(urlParams.embed="1",urlParams.ui="sketch",urlParams.plugins="0",urlParams.proto="json",urlParams.prefetchFonts="1");
+window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;"1"==urlParams.extAuth&&(a="sketch");if(null==a&&isLocalStorage&&"undefined"!==typeof JSON&&"1"!=urlParams.lightbox)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}try{null==a&&768>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null==urlParams.pages&&(urlParams.pages="1"),a="sketch")}catch(c){}"sketch"==a&&(urlParams.sketch="1",a="min");
+return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(d){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];
null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net",b=a.length-c.length,c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"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.5.8",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/"),
+"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="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.5.9",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,10 +2040,11 @@ Editor.lightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5
Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+";Editor.redoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==";
Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.tableImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTIwIDNINWMtMS4xIDAtMiAuOS0yIDJ2MTRjMCAxLjEuOSAyIDIgMmgxNWMxLjEgMCAyLS45IDItMlY1YzAtMS4xLS45LTItMi0yem0wIDJ2M0g1VjVoMTV6bS01IDE0aC01di05aDV2OXpNNSAxMGgzdjlINXYtOXptMTIgOXYtOWgzdjloLTN6Ii8+PC9zdmc+";
-Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dots",dispName:"Dots"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=!0;Editor.simpleLabels=!1;
-Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.darkColor="#2a2a2a";Editor.isDarkMode=function(b){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(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
+Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dots",dispName:"Dots"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;
+Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.darkColor="#2a2a2a";Editor.isDarkMode=function(b){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(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
Editor.prototype.editAsNew=function(b,c){var e=null!=c?"?title="+encodeURIComponent(c):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,g=mxUtils.bind(this,function(c){"ready"==c.data&&c.source==k&&(mxEvent.removeListener(window,"message",g),k.postMessage(b,"*"))});mxEvent.addListener(window,"message",g);k=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+
"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,c){var e=new Graph(null,c,null,null,b);e.transparentBackground=!1;var k=e.isCssTransformsSupported,g=this;e.isCssTransformsSupported=function(){return k.apply(this,arguments)&&(!g.chromeless||!mxClient.IS_SF)};this.chromeless||(e.isBlankLink=function(b){return!this.isExternalProtocol(b)});return e};
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=
@@ -2060,52 +2061,52 @@ 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,p,t,d,f,l,m){var q=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,C=Math.max(1,Math.round((y.width-e-v)/2)),H=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",
+function Dialog(b,c,e,k,g,n,t,d,f,l,m){var p=f?57:0,q=e,u=k,v=f?0:64,y=mxUtils.getDocumentSize();null!=window.innerHeight&&(y.height=window.innerHeight);var x=y.height,C=Math.max(1,Math.round((y.width-e-v)/2)),H=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";C+=y.x;H+=y.y;g&&document.body.appendChild(this.bg);var D=b.createDiv(f?"geTransDialog":"geDialog");g=this.getPosition(C,H,e,k);C=g.x;H=g.y;D.style.width=e+"px";D.style.height=k+"px";D.style.left=C+"px";D.style.top=H+"px";D.style.zIndex=
-this.zIndex;D.appendChild(c);document.body.appendChild(D);!d&&c.clientHeight>D.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=H+14+"px",p.style.left=C+e+38-q+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=
-p,!m)){var E=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){E=!0}),null,mxUtils.bind(this,function(d){E&&(b.hideDialog(!0),E=!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";C=Math.max(1,Math.round((f.width-e-v)/2));H=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(C,
-H,e,k);C=f.x;H=f.y;D.style.left=C+"px";D.style.top=H+"px";D.style.width=e+"px";D.style.height=k+"px";!d&&c.clientHeight>D.clientHeight-v&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=H+14+"px",this.dialogImg.style.left=C+e+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=D;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+this.zIndex;D.appendChild(c);document.body.appendChild(D);!d&&c.clientHeight>D.clientHeight-v&&(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=H+14+"px",n.style.left=C+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 E=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){E=!0}),null,mxUtils.bind(this,function(d){E&&(b.hideDialog(!0),E=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var f=l();null!=f&&(q=e=f.w,u=k=f.h)}f=mxUtils.getDocumentSize();x=f.height;this.bg.style.height=x+"px";C=Math.max(1,Math.round((f.width-e-v)/2));H=Math.max(1,Math.round((x-k-b.footerHeight)/3));e=null!=document.body?Math.min(q,document.body.scrollWidth-v):q;k=Math.min(u,x-v);f=this.getPosition(C,
+H,e,k);C=f.x;H=f.y;D.style.left=C+"px";D.style.top=H+"px";D.style.width=e+"px";D.style.height=k+"px";!d&&c.clientHeight>D.clientHeight-v&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=H+14+"px",this.dialogImg.style.left=C+e+38-p+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=D;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,p,t,d,f,l,m){f=null!=f?f:!0;var q=document.createElement("div");q.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);q.appendChild(n)}c=
-document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=e;q.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!=m&&m()}),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()};q.appendChild(e);this.container=q},PrintDialog=function(b,c){this.create(b,c)};
-PrintDialog.prototype.create=function(b){function c(b){var f=d.checked||l.checked,c=parseInt(q.value)/100;isNaN(c)&&(c=1,q.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(m.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"));
+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 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()};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"));
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 q=document.createElement("input");q.setAttribute("value","100 %");q.setAttribute("size","5");q.style.width="50px";g.appendChild(q);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};
+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};
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=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 m=k.background;c();mxEvent.addListener(l,
-"click",function(d){b.pickColor(m||"none",function(b){m=b;c()});mxEvent.consume(d)});p.appendChild(l);mxUtils.write(p,mxResources.get("gridSize")+":");var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.style.width="40px";q.style.marginLeft="6px";q.value=k.getGridSize();p.appendChild(q);mxEvent.addListener(q,"change",function(){var b=parseInt(q.value);q.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(q.value);isNaN(d)||k.gridSize===d||k.setGridSize(d);d=new ChangePageSetup(b,m,v,f.get());d.ignoreColor=k.background==m;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||q!=document.activeElement&&n!=document.activeElement){b=!1;for(c=0;c<v.length;c++)l=v[c],H?"custom"==l.key&&(d.value=l.key,H=!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="",m.style.display="none"):(q.value=e.width/100,n.value=e.height/100,p.setAttribute("checked","checked"),
-d.value="custom",f.style.display="none",m.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 m=document.createElement("div");m.style.marginLeft=
-"4px";m.style.width="210px";m.style.height="24px";var q=document.createElement("input");q.setAttribute("size","7");q.style.textAlign="right";m.appendChild(q);mxUtils.write(m," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var u={},v=PageSetupDialog.getFormats(),y=0;y<v.length;y++){var x=v[y];u[x.key]=x;var C=document.createElement("option");C.setAttribute("value",
-x.key);mxUtils.write(C,x.title);d.appendChild(C)}var H=!1;g();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(m);var D=e,E=function(b,c){var l=u[d.value];null!=l.format?(q.value=l.format.width/100,n.value=l.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");l=parseFloat(q.value);if(isNaN(l)||0>=l)q.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(q.value)),
-Math.floor(100*parseFloat(n.value)));"custom"!=d.value&&t.checked&&(l=new mxRectangle(0,0,l.height,l.width));c&&H||l.width==D.width&&l.height==D.height||(D=l,null!=k&&k(D))};mxEvent.addListener(c,"click",function(b){p.checked=!0;E(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;E(b);mxEvent.consume(b)});mxEvent.addListener(q,"blur",E);mxEvent.addListener(q,"click",E);mxEvent.addListener(n,"blur",E);mxEvent.addListener(n,"click",E);mxEvent.addListener(t,"change",E);mxEvent.addListener(p,
-"change",E);mxEvent.addListener(d,"change",function(b){H="custom"==d.value;E(b,!0)});E();return{set:function(b){e=b;g(null,null,!0)},get:function(){return D},widthInput:q,heightInput:n}};
+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=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,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 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(q,"click",y);mxEvent.addListener(u,"click",y);e();n.appendChild(u);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,v,f.get());d.ignoreColor=k.background==m;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";
+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<v.length;c++)l=v[c],H?"custom"==l.key&&(d.value=l.key,H=!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 u={},v=PageSetupDialog.getFormats(),y=0;y<v.length;y++){var x=v[y];u[x.key]=x;var C=document.createElement("option");C.setAttribute("value",
+x.key);mxUtils.write(C,x.title);d.appendChild(C)}var H=!1;g();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(m);var D=e,E=function(b,c){var l=u[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&&H||l.width==D.width&&l.height==D.height||(D=l,null!=k&&k(D))};mxEvent.addListener(c,"click",function(b){n.checked=!0;E(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;E(b);mxEvent.consume(b)});mxEvent.addListener(p,"blur",E);mxEvent.addListener(p,"click",E);mxEvent.addListener(q,"blur",E);mxEvent.addListener(q,"click",E);mxEvent.addListener(t,"change",E);mxEvent.addListener(n,
+"change",E);mxEvent.addListener(d,"change",function(b){H="custom"==d.value;E(b,!0)});E();return{set:function(b){e=b;g(null,null,!0)},get:function(){return D},widthInput:p,heightInput:q}};
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,p,t,d,f,l,m,q){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!=q?q+"px":"180px";var C=mxUtils.button(e,function(){if(null==p||p(x.value))f&&b.hideDialog(),k(x.value)});C.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=
+var FilenameDialog=function(b,c,e,k,g,n,t,d,f,l,m,p){f=null!=f?f:!0;var q,u,v=document.createElement("table"),y=document.createElement("tbody");v.style.position="absolute";v.style.top="30px";v.style.left="20px";q=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"))+":");q.appendChild(u);var x=document.createElement("input");
+x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=p?p+"px":"180px";var C=mxUtils.button(e,function(){if(null==n||n(x.value))f&&b.hideDialog(),k(x.value)});C.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")),C.click());b.stopPropagation();
-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!=m&&(u.appendChild(FilenameDialog.createTypeHint(b,x,m)),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!=q?q-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!=m?"12px":"20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&u.appendChild(m);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",u.appendChild(q));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&C.click()});u.appendChild(C);b.editor.cancelFirst||u.appendChild(m);n.appendChild(u);y.appendChild(n);
+b.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(x);q.appendChild(u);if(null!=g||null==t)y.appendChild(q),null!=m&&(u.appendChild(FilenameDialog.createTypeHint(b,x,m)),null!=b.editor.diagramFileTypes&&(q=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")+":"),q.appendChild(u),
+u=document.createElement("td"),u.style.whiteSpace="nowrap",q.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!=p?p-40+"px":"190px",q.appendChild(u),y.appendChild(q)));null!=t&&(q=document.createElement("tr"),u=document.createElement("td"),u.colSpan=2,u.appendChild(t),q.appendChild(u),y.appendChild(q));q=document.createElement("tr");u=document.createElement("td");u.colSpan=2;u.style.paddingTop=
+null!=m?"12px":"20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&u.appendChild(m);null!=d&&(p=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),p.className="geBtn",u.appendChild(p));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&C.click()});u.appendChild(C);b.editor.cancelFirst||u.appendChild(m);q.appendChild(u);y.appendChild(q);
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)});
@@ -2119,25 +2120,25 @@ 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 l=this.gridSize*this.view.scale*this.view.gridSteps,l=-Math.round(l-mxUtils.mod(this.view.translate.x*this.view.scale+c,l))+"px "+-Math.round(l-mxUtils.mod(this.view.translate.y*this.view.scale+d,l))+"px";f.style.backgroundPosition=l}};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,C=p.x+d,H=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(C),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(H))];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 l=this.gridSize*this.view.scale*this.view.gridSteps,l=-Math.round(l-mxUtils.mod(this.view.translate.x*this.view.scale+c,l))+"px "+-Math.round(l-mxUtils.mod(this.view.translate.y*this.view.scale+d,l))+"px";f.style.backgroundPosition=l}};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 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,C=n.x+d,H=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)*v.height)),new mxPoint(Math.round(C),Math.round(n.y+(f+1)*v.height))]:[new mxPoint(Math.round(n.x+(f+1)*v.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(f+1)*v.width),Math.round(H))];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 l=0;l<d.length;l++){if(this.graph.isTableCell(d[l])||this.graph.isTableRow(d[l]))return!1;if(this.graph.getModel().isVertex(d[l])){var e=this.graph.getCellGeometry(d[l]);if(null!=e&&e.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 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.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.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);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=mxRectangle.fromRectangle(d);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 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 m=g[l],q=m.indexOf("=");if(0<=q){e=m.substring(0,q);var n=m.substring(q+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(ba){this.handleError(ba)}};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 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 F=0;F<b.length;F++)m=m.concat(f.getDescendants(b[F]));b=m}f.beginUpdate();try{for(F=0;F<b.length;F++){var q=b[F],n;if(d)n=["fontSize","fontFamily","fontColor"];else{var v=f.getStyle(q),A=null!=v?v.split(";"):[];n=p.slice();for(var u=0;u<A.length;u++){var J=A[u],x=J.indexOf("=");if(0<=x){var N=J.substring(0,x),y=mxUtils.indexOf(n,N);0<=y&&n.splice(y,1);for(m=0;m<l.length;m++){var D=l[m];if(0<=mxUtils.indexOf(D,N))for(var B=0;B<D.length;B++){var E=mxUtils.indexOf(n,D[B]);0<=E&&n.splice(E,
-1)}}}}}var Q=f.isEdge(q);m=Q?e:c;for(var C=f.getStyle(q),u=0;u<n.length;u++){var N=n[u],H=m[N];null!=H&&"edgeStyle"!=N&&("shape"!=N||Q)&&(!Q||g||0>mxUtils.indexOf(t,N))&&(C=mxUtils.setStyle(C,N,H))}Editor.simpleLabels&&(C=mxUtils.setStyle(mxUtils.setStyle(C,"html",null),"whiteSpace",null));f.setStyle(q,C)}}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 q=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=q,this.menubarContainer.onmousedown=q,this.toolbarContainer.onselectstart=q,this.toolbarContainer.onmousedown=q,this.diagramContainer.onselectstart=q,this.diagramContainer.onmousedown=q,this.sidebarContainer.onselectstart=q,this.sidebarContainer.onmousedown=
-q,this.formatContainer.onselectstart=q,this.formatContainer.onmousedown=q,this.footerContainer.onselectstart=q,this.footerContainer.onmousedown=q,null!=this.tabContainer&&(this.tabContainer.onselectstart=q));!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 q(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(){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 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 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(ba){this.handleError(ba)}};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 F=0;F<b.length;F++)m=m.concat(f.getDescendants(b[F]));b=m}f.beginUpdate();try{for(F=0;F<b.length;F++){var p=b[F],q;if(d)q=["fontSize","fontFamily","fontColor"];else{var v=f.getStyle(p),A=null!=v?v.split(";"):[];q=n.slice();for(var u=0;u<A.length;u++){var J=A[u],x=J.indexOf("=");if(0<=x){var y=J.substring(0,x),N=mxUtils.indexOf(q,y);0<=N&&q.splice(N,1);for(m=0;m<l.length;m++){var D=l[m];if(0<=mxUtils.indexOf(D,y))for(var B=0;B<D.length;B++){var E=mxUtils.indexOf(q,D[B]);0<=E&&q.splice(E,
+1)}}}}}var Q=f.isEdge(p);m=Q?e:c;for(var C=f.getStyle(p),u=0;u<q.length;u++){var y=q[u],H=m[y];null!=H&&"edgeStyle"!=y&&("shape"!=y||Q)&&(!Q||g||0>mxUtils.indexOf(t,y))&&(C=mxUtils.setStyle(C,y,H))}Editor.simpleLabels&&(C=mxUtils.setStyle(mxUtils.setStyle(C,"html",null),"whiteSpace",null));f.setStyle(p,C)}}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 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 C=k.isZoomWheelEvent;
@@ -2145,9 +2146,9 @@ k.isZoomWheelEvent=function(){return u||C.apply(this,arguments)};var H=!1,D=null
this.toolbar.fontMenu=D;this.toolbar.sizeMenu=E}H=k.cellEditor.isContentEditing();D=b;E=f;M=d}}),K=this,B=k.cellEditor.startEditing;k.cellEditor.startEditing=function(){B.apply(this,arguments);G();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 L=k.cellEditor.stopEditing;k.cellEditor.stopEditing=function(b,d){try{L.apply(this,arguments),G()}catch(Q){K.handleError(Q)}};k.container.setAttribute("tabindex","0");k.container.style.cursor="default";if(window.self===window.top&&null!=k.container.parentNode)try{k.container.focus()}catch(da){}var O=
k.fireMouseEvent;k.fireMouseEvent=function(b,d,f){b==mxEvent.MOUSE_DOWN&&this.container.focus();O.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"),q=c.getProperty("values"),
-m=0;m<e.length;m++){var n=0<=mxUtils.indexOf(d,e[m]);if("strokeColor"!=e[m]||null!=q[m]&&"none"!=q[m])if(0<=mxUtils.indexOf(t,e[m]))g||0<=mxUtils.indexOf(f,e[m])?null==q[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=q[m]:l&&0<=mxUtils.indexOf(p,e[m])&&(null==q[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=q[m]);else if(0<=mxUtils.indexOf(p,e[m])){if(l||n)null==q[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=q[m];if(g||n||0<=mxUtils.indexOf(f,e[m]))null==
-q[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=q[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));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||
"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());
@@ -2161,16 +2162,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 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,m){var k=b.getCompositeParent(d.cell);f=b.getCellGeometry(k);
+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,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&&
+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&&
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 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,m=this.editor.graph,f=document.createElement("div");g=m.view.getState(e);var q=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!=q&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(q,[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!=p&&p()})});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 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.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)]};
@@ -2185,27 +2186,27 @@ 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),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=
+0),q=0;q<l.length;q++){g.add(k,l[q]);var n=c.view.getState(e[q]);if(null!=n){var v=c.getCellGeometry(l[q]);null!=v&&v.relative&&!g.isEdge(e[q])&&null==f[mxObjectIdentity.get(g.getParent(e[q]))]&&(v.offset=null,v.relative=!1,v.x=n.x/n.view.scale-n.view.translate.x,v.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=
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,F=b.view.scale,k=mxRectangle.fromRectangle(l);
-k.x=k.x/F-m.x;k.y=k.y/F-m.y;k.width/=F;k.height/=F;var m=b.container.scrollTop,q=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/k.width)):F;f=(p-d*k.width)/2/d;var v=0==this.lightboxVerticalDivider?0:(n-d*k.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-
-k.x),Math.floor(v-k.y)),b.container.scrollTop=m*d/F,b.container.scrollLeft=q*d/F;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/F),Math.floor(l.y+e/F))}});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,
+k.x=k.x/F-m.x;k.y=k.y/F-m.y;k.width/=F;k.height/=F;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/k.width)):F;f=(n-d*k.width)/2/d;var v=0==this.lightboxVerticalDivider?0:(q-d*k.height)/this.lightboxVerticalDivider/d;g&&(f=Math.max(f,0),v=Math.max(v,0));if(g||l.width<n||l.height<q)b.view.scaleAndTranslate(d,Math.floor(f-
+k.x),Math.floor(v-k.y)),b.container.scrollTop=m*d/F,b.container.scrollLeft=p*d/F;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/F),Math.floor(l.y+e/F))}});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 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")),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 q=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",q);this.editor.addListener("pageSelected",m)}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,
+"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,u=null,v=mxUtils.bind(this,function(b){null!=q&&(window.clearTimeout(q),q=null);null!=u&&(window.clearTimeout(u),u=null);q=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);q=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!=q&&(window.clearTimeout(q),q=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=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,
"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")),C=b.getModel();C.addListener(mxEvent.CHANGE,function(){x.style.display=1<C.getChildCount(C.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(q=0;q<this.lightboxToolbarActions.length;q++){var H=this.lightboxToolbarActions[q];H.elem=p(H.fn,H.icon,H.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=
+Editor.layersImage,mxResources.get("layers")),C=b.getModel();C.addListener(mxEvent.CHANGE,function(){x.style.display=1<C.getChildCount(C.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 H=this.lightboxToolbarActions[p];H.elem=n(H.fn,H.icon,H.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),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 D=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)<D&&Math.abs(this.scrollTop-b.container.scrollTop)<D&&Math.abs(this.startX-f.getGraphX())<D&&Math.abs(this.startY-f.getGraphY())<D&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?v():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var E=
@@ -2233,7 +2234,7 @@ EditorUi.prototype.setScrollbars=function(b){var c=this.editor.graph,e=c.contain
EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph;if(!this.editor.extendCanvas)b.container.scrollTop=0,b.container.scrollLeft=0,mxUtils.hasScrollbars(b.container)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(b.container))if(b.pageVisible){var c=b.getPagePadding();b.container.scrollTop=Math.floor(c.y-this.editor.initialTopSpacing)-1;b.container.scrollLeft=Math.floor(Math.min(c.x,(b.container.scrollWidth-b.container.clientWidth)/2))-
1;c=b.getGraphBounds();0<c.width&&0<c.height&&(c.x>b.container.scrollLeft+.9*b.container.clientWidth&&(b.container.scrollLeft=Math.min(c.x+c.width-b.container.clientWidth,c.x-10)),c.y>b.container.scrollTop+.9*b.container.clientHeight&&(b.container.scrollTop=Math.min(c.y+c.height-b.container.clientHeight,c.y-10)))}else{var c=b.getGraphBounds(),e=Math.max(c.width,b.scrollTileSize.width*b.view.scale);b.container.scrollTop=Math.floor(Math.max(0,c.y-Math.max(20,(b.container.clientHeight-Math.max(c.height,
b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,c.x-Math.max(0,(b.container.clientWidth-e)/2)))}else{var c=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds()),e=b.view.translate,k=b.view.scale;c.x=c.x/k-e.x;c.y=c.y/k-e.y;c.width/=k;c.height/=k;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-c.width)/2)-c.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-c.height)/4))-c.y+1))}};
-EditorUi.prototype.setPageVisible=function(b){var c=this.editor.graph,e=mxUtils.hasScrollbars(c.container),k=0,g=0;e&&(k=c.view.translate.x*c.view.scale-c.container.scrollLeft,g=c.view.translate.y*c.view.scale-c.container.scrollTop);c.pageVisible=b;c.pageBreaksVisible=b;c.preferPageSize=b;c.view.validateBackground();if(e){var p=c.getSelectionCells();c.clearSelection();c.setSelectionCells(p)}c.sizeDidChange();e&&(c.container.scrollLeft=c.view.translate.x*c.view.scale-k,c.container.scrollTop=c.view.translate.y*
+EditorUi.prototype.setPageVisible=function(b){var c=this.editor.graph,e=mxUtils.hasScrollbars(c.container),k=0,g=0;e&&(k=c.view.translate.x*c.view.scale-c.container.scrollLeft,g=c.view.translate.y*c.view.scale-c.container.scrollTop);c.pageVisible=b;c.pageBreaksVisible=b;c.preferPageSize=b;c.view.validateBackground();if(e){var n=c.getSelectionCells();c.clearSelection();c.setSelectionCells(n)}c.sizeDidChange();e&&(c.container.scrollLeft=c.view.translate.x*c.view.scale-k,c.container.scrollTop=c.view.translate.y*
c.view.scale-g);c.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangeGridColor(b,c){this.ui=b;this.color=c}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
function ChangePageSetup(b,c,e,k,g){this.ui=b;this.previousColor=this.color=c;this.previousImage=this.image=e;this.previousFormat=this.format=k;this.previousPageScale=this.pageScale=g;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var c=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=c}if(!this.ignoreImage){this.image=this.previousImage;var c=b.backgroundImage,e=this.previousImage;null!=e&&null!=e.src&&"data:page/id,"==e.src.substring(0,13)&&(e=this.ui.createImageForPageLink(e.src,this.ui.currentPage));this.ui.setBackgroundImage(e);this.previousImage=c}null!=this.previousFormat&&
@@ -2242,19 +2243,19 @@ 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 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||
+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||
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==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};
+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};
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)),c=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",c+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",c+=this.toolbarHeight);0<c&&(c+=1);var p=0;if(null!=this.sidebarFooterContainer){var t=this.footerHeight+k,p=Math.max(0,Math.min(e-c-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=p+"px";
+20)),c=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",c+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",c+=this.toolbarHeight);0<c&&(c+=1);var n=0;if(null!=this.sidebarFooterContainer){var t=this.footerHeight+k,n=Math.max(0,Math.min(e-c-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=n+"px";
this.sidebarFooterContainer.style.bottom=t+"px"}e=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=c+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=c+"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.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");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+
-p+k+"px";this.formatContainer.style.bottom=this.footerHeight+k+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=d+t.x+"px",this.diagramContainer.style.top=c+t.y+"px",this.diagramContainer.style.right=e+"px",this.diagramContainer.style.bottom=this.footerHeight+k+g+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+n+k+"px";this.formatContainer.style.bottom=this.footerHeight+k+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=d+t.x+"px",this.diagramContainer.style.top=c+t.y+"px",this.diagramContainer.style.right=e+"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"));
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};
@@ -2263,13 +2264,13 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(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 p(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,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,m,q,n){b=new ErrorDialog(this,b,c,e||mxResources.get("ok"),k,g,p,t,q,d,f);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(b.container,l||340,m||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.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.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 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()};
+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()};
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")};
@@ -2285,15 +2286,15 @@ 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(),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.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.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,d,f){if(!k.isSelectionEmpty()&&k.isEnabled())if(d=null!=d?d:1,f){k.getModel().beginUpdate();try{var c=k.getSelectionCells();for(f=0;f<c.length;f++)if(k.getModel().isVertex(c[f])&&k.isCellResizable(c[f])){var e=k.getCellGeometry(c[f]);null!=e&&(e=e.clone(),37==b?e.width=Math.max(0,e.width-d):38==b?e.height=Math.max(0,e.height-d):39==b?e.width+=d:40==b&&(e.height+=d),k.getModel().setGeometry(c[f],e))}}finally{k.getModel().endUpdate()}}else{var c=
k.getSelectionCell(),e=k.model.getParent(c),l=k.getView().scale;f=null;1==k.getSelectionCount()&&k.model.isVertex(c)&&null!=k.layoutManager&&!k.isCellLocked(c)&&(f=k.layoutManager.getLayout(e));if(null!=f&&f.constructor==mxStackLayout)d=e.getIndex(c),37==b||38==b?k.model.add(e,c,Math.max(0,d-1)):39!=b&&40!=b||k.model.add(e,c,Math.min(k.model.getChildCount(e),d+1));else{var g=k.graphHandler;null!=g&&(null==g.first&&g.start(k.getSelectionCell(),0,0,k.getSelectionCells()),null!=g.first&&(e=c=0,37==b?
-c=-d:38==b?e=-d:39==b?c=d:40==b&&(e=d),g.currentDx+=c*l,g.currentDy+=e*l,g.checkPreview(),g.updatePreview()),null!=t&&window.clearTimeout(t),t=window.setTimeout(function(){if(null!=g.first){var b=g.roundLength(g.currentDx/l),d=g.roundLength(g.currentDy/l);g.moveCells(g.cells,b,d);g.reset()}},400))}}}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=null,d={37:mxConstants.DIRECTION_WEST,
+c=-d:38==b?e=-d:39==b?c=d:40==b&&(e=d),g.currentDx+=c*l,g.currentDy+=e*l,g.checkPreview(),g.updatePreview()),null!=t&&window.clearTimeout(t),t=window.setTimeout(function(){if(null!=g.first){var b=g.roundLength(g.currentDx/l),d=g.roundLength(g.currentDy/l);g.moveCells(g.cells,b,d);g.reset()}},400))}}}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=null,d={37:mxConstants.DIRECTION_WEST,
38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=g.getFunction;mxKeyHandler.prototype.getFunction=function(b){if(k.isEnabled()){if(mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){var l=e.actions.get(e.altShiftActions[b.keyCode]);if(null!=l)return l.funct}if(null!=d[b.keyCode]&&!k.isSelectionEmpty())if(!this.isControlDown(b)&&mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){if(k.model.isVertex(k.getSelectionCell()))return function(){var f=k.connectVertex(k.getSelectionCell(),
d[b.keyCode],k.defaultEdgeLength,b,!0);null!=f&&0<f.length&&(1==f.length&&k.model.isEdge(f[0])?k.setSelectionCell(k.model.getTerminal(f[0],!1)):k.setSelectionCell(f[f.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 f.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 l=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");
@@ -2311,23 +2312,23 @@ mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0"
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,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);
+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 q=this.selectionCellsHandler.getHandler(g.cell);null!=q&&null!=q.bends&&0<q.bends.length&&(l=q.getHandleForEvent(e))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(e.getEvent())&&(q=this.selectionCellsHandler.getHandler(g.cell),null==q||null==q.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),q=this.model.getParent(p);if(!this.isCellSelected(q)){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(q,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(q),this.selectCellForEvent(q,e.getEvent()),q=this.selectionCellsHandler.getHandler(q),null!=q&&(v=q.getHandleForEvent(e),null!=v&&(q.start(e.getGraphX(),e.getGraphY(),v),q.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)&&(q=this.getActualStartSize(g.cell),
-(0<q.x||0<q.width)&&mxUtils.intersects(n,new mxRectangle(g.x+(q.x-q.width-1)*k+(0==q.x?g.width:0),g.y,1,g.height))||(0<q.y||0<q.height)&&mxUtils.intersects(n,new mxRectangle(g.x,g.y+(q.y-q.height-1)*k+(0==q.y?g.height:0),g.width,1)))&&(this.selectCellForEvent(g.cell,e.getEvent()),q=this.selectionCellsHandler.getHandler(g.cell),null!=q&&(v=mxEvent.CUSTOM_HANDLE-q.customHandles.length+1,q.start(e.getGraphX(),e.getGraphY(),v),e.consume())),g=this.view.getState(this.model.getParent(g.cell))}}}));this.addMouseListener({mouseDown:function(b,
+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 v=this.getCellGeometry(g.cell),v=null!=v.alternateBounds?v.alternateBounds:v;if(mxUtils.intersects(q,new mxRectangle(g.x,g.y-2,v.width*k,3))&&this.model.getChildAt(p,0)!=n||mxUtils.intersects(q,new mxRectangle(g.x,g.y+v.height-2,v.width,3))||mxUtils.intersects(q,new mxRectangle(g.x-2,g.y,2,v.height*k))&&
+this.model.getChildAt(n,0)!=g.cell||mxUtils.intersects(q,new mxRectangle(g.x+v.width*k-2,g.y,2,v.height*k)))n=this.selectionCellsHandler.isHandled(p),this.selectCellForEvent(p,e.getEvent()),p=this.selectionCellsHandler.getHandler(p),null!=p&&(v=p.getHandleForEvent(e),null!=v&&(p.start(e.getGraphX(),e.getGraphY(),v),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&&(v=mxEvent.CUSTOM_HANDLE-p.customHandles.length+1,p.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 q=this.view.getEdgeStyle(e),n=q==mxEdgeStyle.EntityRelation;m||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==q&&null==g||q==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!=q&&(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==q?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),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),q=this.model.getParent(n),!this.isCellSelected(q)))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(q,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 q=this.getActualStartSize(n.cell),p=this.view.scale;(0<q.x||0<q.width)&&mxUtils.intersects(g,new mxRectangle(n.x+(q.x-q.width-1)*p+(0==q.x?n.width*p:0),n.y,1,n.height))?k="col-resize":(0<q.y||0<q.height)&&mxUtils.intersects(g,new mxRectangle(n.x,n.y+(q.y-q.height-1)*p+(0==q.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 q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var b=q.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])&&
+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(),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 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 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,C=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;C.apply(this,arguments);b!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var H=
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"))&&H.apply(this,arguments)};var D=this.isToggleEvent;this.isToggleEvent=function(b){return D.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};var E=v.isForceRubberbandEvent;v.isForceRubberbandEvent=function(b){return E.apply(this,
@@ -2347,13 +2348,13 @@ 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,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.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.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 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.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.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"!=urlParams.grid;Graph.prototype.lightbox=!1;
@@ -2365,7 +2366,7 @@ 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]],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()||
+(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()||
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)&&
"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);
@@ -2376,20 +2377,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(p){}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(n){}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 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};
+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};
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,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 m=g*l,q=1;q<p;q++)if(m<=k[q-1]){f.push(new mxPoint(e[q-1].x+(e[q].x-e[q-1].x)*m/k[q-1],e[q-1].y+(e[q].y-e[q-1].y)*m/k[q-1]));break}else m-=k[q-1],f.push(e[q]);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,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!=
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 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.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.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")};
@@ -2399,38 +2400,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,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"](),m=b[d+"Month"](),q=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:m+1,mm:t(m+1),mmm:k.i18n.monthNames[m],mmmm:k.i18n.monthNames[m+
-12],yy:String(q).slice(2),yyyy:q,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,
+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"](),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: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:u,MM:t(u),s:v,ss:t(v),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,
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),p=0;p<g;p++)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=
+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,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()};
+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.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,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),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 q=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!=q&&this.model.isVertex(q.cell)&&(l=q.x,n=q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(m.x+=b.parent.geometry.x,m.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(l+m.x*e,n+m.y*e)).grow(40*e);p=null!=p?
-this.getCells(0,0,0,0,null,null,p,null,!0):null;var q=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==q||null==x||mxUtils.intersects(q,x)||(v=p[y])}}var C=
+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),u=null,v=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==u||n[y]==this.model.getParent(b)))u=n[y];else if(null==v&&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)||(v=n[y])}}var C=
!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||g;C&&("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 H=[],D=v,v=u;g=mxUtils.bind(this,function(e){if(null==t||null!=e||null==v&&f){this.model.beginUpdate();try{if(null==D&&C){var g=this.getAbsoluteParent(null!=e?e:b),g=f?b:this.getCompositeParent(g);D=null!=e?e:this.duplicateCells([g],
-!1)[0];null!=e&&this.addCells([D],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(D);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!=u?(this.addCells([D],u,null,null,null,!0),v=null):C&&!f&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}var q=mxEvent.isControlDown(k)&&
-mxEvent.isShiftDown(k)&&C||null==v&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,D,this.createCurrentEdgeStyle());if(null!=q&&this.connectionHandler.insertBeforeSource){var n=null;for(e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=q.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==q.parent&&(n=e.parent.getIndex(e),this.model.add(e.parent,q,n))}null==v&&null!=D&&null!=b.parent&&f&&c==mxConstants.DIRECTION_WEST&&(n=b.parent.getIndex(b),this.model.add(b.parent,
-D,n));null!=q&&H.push(q);null==v&&null!=D&&H.push(D);null==D&&null!=q&&q.geometry.setTerminalPoint(m,!1);null!=q&&this.fireEvent(new mxEventObject("cellsInserted","cells",[q]))}finally{this.model.endUpdate()}}if(null!=d)d(H);else return H});if(null==t||null!=D||!C||null==v&&f)return g(D);t(l+m.x*e,n+m.y*e,g)};
+!1)[0];null!=e&&this.addCells([D],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(D);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!=u?(this.addCells([D],u,null,null,null,!0),v=null):C&&!f&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}var p=mxEvent.isControlDown(k)&&
+mxEvent.isShiftDown(k)&&C||null==v&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,D,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==v&&null!=D&&null!=b.parent&&f&&c==mxConstants.DIRECTION_WEST&&(q=b.parent.getIndex(b),this.model.add(b.parent,
+D,q));null!=p&&H.push(p);null==v&&null!=D&&H.push(D);null==D&&null!=p&&p.geometry.setTerminalPoint(m,!1);null!=p&&this.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{this.model.endUpdate()}}if(null!=d)d(H);else return H});if(null==t||null!=D||!C||null==v&&f)return g(D);t(l+m.x*e,q+m.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 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 m=this.model.getParent(e[p]),q=this.layoutManager.getLayout(m);
-null==q?null!=g&&this.isMoveCellsEvent(g,t)&&this.moveSiblings(t,m,f,l):null!=g&&mxEvent.isAltDown(g)||q.constructor!=mxStackLayout||q.resizeLast||this.resizeParentStacks(m,q,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.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.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 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.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.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};
@@ -2445,7 +2446,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 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,
+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,
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,
@@ -2455,93 +2456,93 @@ 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(),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.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.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 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")),
+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")),
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 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};
+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.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-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 m=this.getCellGeometry(p);null!=m&&(e||(e=b==t[t.length-1]),e&&(m=m.clone(),m.height+=c,k.setGeometry(p,m)));
-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),m=t[b],q=this.getCellGeometry(m);null!=q&&(q=q.clone(),q.width+=c,null!=q.alternateBounds&&(q.alternateBounds.width+=c),k.setGeometry(m,q));b<t.length-1&&(m=t[b+1],q=this.getCellGeometry(m),null!=q&&(q=q.clone(),
-q.x+=c,e||(q.width-=c,null!=q.alternateBounds&&(q.alternateBounds.width-=c)),k.setGeometry(m,q)))}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};
+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};
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),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 m=0;m<t.length;m++){var q=this.graph.getCellGeometry(t[m]);null!=q&&(q=q.clone(),q.y=b.y,q.height=e-b.y-b.height,null!=c?(q.x=c[m],q.width=c[m+1]-q.x,m==t.length-1&&m<c.length-2&&(q.width=k-q.x-b.x-b.width)):(q.x=f,f+=q.width,m==t.length-1?q.width=k-b.x-b.width-l:l+=q.width),q.alternateBounds=
-new mxRectangle(0,0,q.width,q.height),p.setGeometry(t[m],q));var n=!0,u=g[m];null!=u&&null!=u.geo&&null!=u.rowspan&&1<u.rowspan&&(u.geo.height+=null!=q.alternateBounds?q.alternateBounds.height:q.height,n=!1,u.rowspan--);null!=d&&null!=d.geo&&null!=d.colspan&&1<d.colspan&&(d.geo.width+=null!=q.alternateBounds?q.alternateBounds.width:q.width,n=!1,d.colspan--);p.setVisible(t[m],n);n=this.graph.getCurrentCellStyle(t[m],!0);q={style:n,cell:t[m],geo:q};if(null!=n){if(null==d||1>d.colspan)q.colspan=parseInt(n.colspan||
-0),d=q;null==u||1>u.rowspan?(q.rowspan=parseInt(n.rowspan||0),g[m]=q):null!=u&&(q.colspan=parseInt(u.style.colspan||0))}}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,m=t.getChildCells(b,!0),q=this.getSize(m,!1);if(0<f&&0<l&&0<m.length&&0<q){if(g){var n=this.graph.getCellGeometry(m[m.length-
-1]);null!=n&&(n=n.clone(),n.height=f-q+n.height,t.setGeometry(m[m.length-1],n))}for(var u=p?null:this.getRowLayout(m[0],l),v=[],y=c.y,x=0;x<m.length;x++)n=this.graph.getCellGeometry(m[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/q*f,n.height=Math.round(y)-n.y,t.setGeometry(m[x],n)),d=Math.max(d,this.layoutRow(m[x],u,n.height,l,v));k&&f<q&&(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+
+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,g){var n=this.graph.getModel(),t=n.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 m=0;m<t.length;m++){var p=this.graph.getCellGeometry(t[m]);null!=p&&(p=p.clone(),p.y=b.y,p.height=e-b.y-b.height,null!=c?(p.x=c[m],p.width=c[m+1]-p.x,m==t.length-1&&m<c.length-2&&(p.width=k-p.x-b.x-b.width)):(p.x=f,f+=p.width,m==t.length-1?p.width=k-b.x-b.width-l:l+=p.width),p.alternateBounds=
+new mxRectangle(0,0,p.width,p.height),n.setGeometry(t[m],p));var q=!0,u=g[m];null!=u&&null!=u.geo&&null!=u.rowspan&&1<u.rowspan&&(u.geo.height+=null!=p.alternateBounds?p.alternateBounds.height:p.height,q=!1,u.rowspan--);null!=d&&null!=d.geo&&null!=d.colspan&&1<d.colspan&&(d.geo.width+=null!=p.alternateBounds?p.alternateBounds.width:p.width,q=!1,d.colspan--);n.setVisible(t[m],q);q=this.graph.getCurrentCellStyle(t[m],!0);p={style:q,cell:t[m],geo:p};if(null!=q){if(null==d||1>d.colspan)p.colspan=parseInt(q.colspan||
+0),d=p;null==u||1>u.rowspan?(p.rowspan=parseInt(q.rowspan||0),g[m]=p):null!=u&&(p.colspan=parseInt(u.style.colspan||0))}}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"),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 u=n?null:this.getRowLayout(m[0],l),v=[],y=c.y,x=0;x<m.length;x++)q=this.graph.getCellGeometry(m[x]),null!=q&&(q=q.clone(),q.x=c.x,q.width=l,q.y=Math.round(y),y=g||k?y+q.height:y+q.height/p*f,q.height=Math.round(y)-q.y,t.setGeometry(m[x],q)),d=Math.max(d,this.layoutRow(m[x],u,q.height,l,v));k&&f<p&&(e=e.clone(),e.height=y+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()}}};
(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],p=[],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,M=0;M<this.validEdges.length;M++){var G=this.validEdges[M],K=G.absolutePoints;if(null!=K&&mxUtils.intersects(b,G)&&"1"!=G.style.noJump)for(G=0;G<K.length-1;G++){for(var B=K[G+1],L=K[G],t=K[G+2];G<K.length-2&&mxUtils.ptSegDistSq(L.x,L.y,t.x,t.y,B.x,B.y)<1*this.scale*this.scale;)B=
-t,G++,t=K[G+2];t=mxUtils.intersection(m.x,m.y,k.x,k.y,L.x,L.y,B.x,B.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-L.x)>g||Math.abs(t.y-L.y)>g)&&(Math.abs(t.x-B.x)>g||Math.abs(t.y-B.y)>g)){B=t.x-m.x;L=t.y-m.y;t={distSq:B*B+L*L,x:t.x,y:t.y};for(B=0;B<p.length;B++)if(p[B].distSq>t.distSq){p.splice(B,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(G=0;G<p.length;G++)f=e(1,p[G].x,
-p[G].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,m=null,q=[],n=null;b.begin();for(var t=0;t<this.state.routedPoints.length;t++){var G=this.state.routedPoints[t],K=new mxPoint(G.x/this.scale,G.y/this.scale);0==t?K=d[0]:t==this.state.routedPoints.length-1&&(K=d[d.length-1]);var B=!1;if(null!=k&&1==G.type){var L=this.state.routedPoints[t+1],G=L.x/this.scale-K.x,L=L.y/this.scale-K.y,G=G*G+L*L;null==n&&(n=new mxPoint(K.x-k.x,K.y-k.y),
-m=Math.sqrt(n.x*n.x+n.y*n.y),0<m?(n.x=n.x*e/m,n.y=n.y*e/m):n=null);G>e*e&&0<m&&(G=k.x-K.x,L=k.y-K.y,G=G*G+L*L,G>e*e&&(B=new mxPoint(K.x-n.x,K.y-n.y),G=new mxPoint(K.x+n.x,K.y+n.y),q.push(B),this.addPoints(b,q,f,c,!1,null,l),q=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,l=!1,"sharp"==g?(b.lineTo(B.x-n.y*q,B.y+n.x*q),b.lineTo(G.x-n.y*q,G.y+n.x*q),b.lineTo(G.x,G.y)):"line"==g?(b.moveTo(B.x+n.y*q,B.y-n.x*q),b.lineTo(B.x-n.y*q,B.y+n.x*q),b.moveTo(G.x-n.y*q,G.y+n.x*q),b.lineTo(G.x+n.y*
-q,G.y-n.x*q),b.moveTo(G.x,G.y)):"arc"==g?(q*=1.3,b.curveTo(B.x-n.y*q,B.y+n.x*q,G.x-n.y*q,G.y+n.x*q,G.x,G.y)):(b.moveTo(G.x,G.y),l=!0),q=[G],B=!0))}else n=null;B||(q.push(K),k=K)}this.addPoints(b,q,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 q=Math.cos(-k),n=Math.sin(-k),g=mxUtils.getRotatedPoint(g,q,n,m);q=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);q+=parseFloat(b.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(f,g,0==k&&l,q);0!=k&&(q=Math.cos(k),n=Math.sin(k),g=mxUtils.getRotatedPoint(g,q,n,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],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,M=0;M<this.validEdges.length;M++){var G=this.validEdges[M],K=G.absolutePoints;if(null!=K&&mxUtils.intersects(b,G)&&"1"!=G.style.noJump)for(G=0;G<K.length-1;G++){for(var B=K[G+1],L=K[G],t=K[G+2];G<K.length-2&&mxUtils.ptSegDistSq(L.x,L.y,t.x,t.y,B.x,B.y)<1*this.scale*this.scale;)B=
+t,G++,t=K[G+2];t=mxUtils.intersection(m.x,m.y,k.x,k.y,L.x,L.y,B.x,B.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-L.x)>g||Math.abs(t.y-L.y)>g)&&(Math.abs(t.x-B.x)>g||Math.abs(t.y-B.y)>g)){B=t.x-m.x;L=t.y-m.y;t={distSq:B*B+L*L,x:t.x,y:t.y};for(B=0;B<n.length;B++)if(n[B].distSq>t.distSq){n.splice(B,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(G=0;G<n.length;G++)f=e(1,n[G].x,
+n[G].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 G=this.state.routedPoints[t],K=new mxPoint(G.x/this.scale,G.y/this.scale);0==t?K=d[0]:t==this.state.routedPoints.length-1&&(K=d[d.length-1]);var B=!1;if(null!=k&&1==G.type){var L=this.state.routedPoints[t+1],G=L.x/this.scale-K.x,L=L.y/this.scale-K.y,G=G*G+L*L;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);G>e*e&&0<m&&(G=k.x-K.x,L=k.y-K.y,G=G*G+L*L,G>e*e&&(B=new mxPoint(K.x-q.x,K.y-q.y),G=new mxPoint(K.x+q.x,K.y+q.y),p.push(B),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(B.x-q.y*p,B.y+q.x*p),b.lineTo(G.x-q.y*p,G.y+q.x*p),b.lineTo(G.x,G.y)):"line"==g?(b.moveTo(B.x+q.y*p,B.y-q.x*p),b.lineTo(B.x-q.y*p,B.y+q.x*p),b.moveTo(G.x-q.y*p,G.y+q.x*p),b.lineTo(G.x+q.y*
+p,G.y-q.x*p),b.moveTo(G.x,G.y)):"arc"==g?(p*=1.3,b.curveTo(B.x-q.y*p,B.y+q.x*p,G.x-q.y*p,G.y+q.x*p,G.x,G.y)):(b.moveTo(G.x,G.y),l=!0),p=[G],B=!0))}else q=null;B||(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,
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(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 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};
+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};
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 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}}};
+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}}};
"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.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);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 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){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=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++)q=this.model.getChildren(this.moveCells([k[g]],d,f,!1,this.model.getRoot())[0]),null!=q&&(b=b.concat(q));else{var q=g.getChildren(k[0]);null!=
-q&&(b=this.moveCells(q,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 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 m=this.view.getState(b[e]);if(null!=m){var q=this.getCellGeometry(f[e]);null!=q&&q.relative&&!this.model.isEdge(b[e])&&null==c.get(this.model.getParent(b[e]))&&(q.offset=null,q.relative=!1,q.x=m.x/m.view.scale-m.view.translate.x,q.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=
+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 q=this.getChildCells(c,!0);for(d=0;d<q.length;d++){var n=this.getCellGeometry(q[d]);null!=n&&n.relative&&0<n.x&&this.model.remove(q[d])}var F=this.getChildCells(b,!0);for(d=0;d<F.length;d++)n=this.getCellGeometry(F[d]),null!=n&&n.relative&&
-0>=n.x&&this.model.remove(F[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 la=this.model.getTerminal(c,!1);if(null!=la){var v=this.getCurrentCellStyle(la);null!=v&&"1"==v.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[b]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,
+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 F=this.getChildCells(b,!0);for(d=0;d<F.length;d++)q=this.getCellGeometry(F[d]),null!=q&&q.relative&&
+0>=q.x&&this.model.remove(F[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 la=this.model.getTerminal(c,!1);if(null!=la){var v=this.getCurrentCellStyle(la);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 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=[],q=0;q<b.length;q++)this.isTable(b[q])?k=k.concat(this.model.getChildCells(b[q],!0).reverse()):k.push(b[q]);b=k}this.model.beginUpdate();try{k=[];for(q=0;q<
-b.length;q++)if(null!=e&&this.isTableRow(b[q])){var n=this.model.getParent(b[q]),F=this.getCellGeometry(b[q]);this.isTable(n)&&k.push(n);if(null!=n&&null!=F&&this.isTable(n)&&this.isTable(e)&&(c||n!=e)){if(!c){var v=this.getCellGeometry(n);null!=v&&(v=v.clone(),v.height-=F.height,this.model.setGeometry(n,v))}v=this.getCellGeometry(e);null!=v&&(v=v.clone(),v.height+=F.height,this.model.setGeometry(e,v));var la=this.model.getChildCells(e,!0);if(0<la.length){b[q]=c?this.cloneCell(b[q]):b[q];var u=this.model.getChildCells(b[q],
-!0),p=this.model.getChildCells(la[0],!0),A=p.length-u.length;if(0<A)for(var x=0;x<A;x++){var J=this.cloneCell(u[u.length-1]);null!=J&&(J.value="",this.model.add(b[q],J))}else if(0>A)for(x=0;x>A;x--)this.model.remove(u[u.length+x-1]);u=this.model.getChildCells(b[q],!0);for(x=0;x<p.length;x++){var P=this.getCellGeometry(p[x]),ta=this.getCellGeometry(u[x]);null!=P&&null!=ta&&(ta=ta.clone(),ta.width=P.width,this.model.setGeometry(u[x],ta))}}}}for(var t=m.apply(this,arguments),q=0;q<k.length;q++)!c&&this.model.contains(k[q])&&
-0==this.model.getChildCount(k[q])&&this.model.remove(k[q]);c&&this.updateCustomLinks(this.createCellMapping(l,this.createCellLookup(b)),t)}finally{this.model.endUpdate()}return t};var q=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=q.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=
+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]),F=this.getCellGeometry(b[p]);this.isTable(q)&&k.push(q);if(null!=q&&null!=F&&this.isTable(q)&&this.isTable(e)&&(c||q!=e)){if(!c){var v=this.getCellGeometry(q);null!=v&&(v=v.clone(),v.height-=F.height,this.model.setGeometry(q,v))}v=this.getCellGeometry(e);null!=v&&(v=v.clone(),v.height+=F.height,this.model.setGeometry(e,v));var la=this.model.getChildCells(e,!0);if(0<la.length){b[p]=c?this.cloneCell(b[p]):b[p];var u=this.model.getChildCells(b[p],
+!0),n=this.model.getChildCells(la[0],!0),A=n.length-u.length;if(0<A)for(var x=0;x<A;x++){var J=this.cloneCell(u[u.length-1]);null!=J&&(J.value="",this.model.add(b[p],J))}else if(0>A)for(x=0;x>A;x--)this.model.remove(u[u.length+x-1]);u=this.model.getChildCells(b[p],!0);for(x=0;x<n.length;x++){var P=this.getCellGeometry(n[x]),ta=this.getCellGeometry(u[x]);null!=P&&null!=ta&&(ta=ta.clone(),ta.width=P.width,this.model.setGeometry(u[x],ta))}}}}for(var t=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)),t)}finally{this.model.endUpdate()}return t};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=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(qa){}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)&&!this.isCellLocked(b)};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 q=m.getTerminalPoint(!0),n=m.getTerminalPoint(!1);m.setTerminalPoint(q,!1);m.setTerminalPoint(n,!0);f.setGeometry(g,
-m);var F=this.view.getState(g),v=this.view.getState(l),u=this.view.getState(k);if(null!=F){var p=null!=v?this.getConnectionConstraint(F,v,!0):null,la=null!=u?this.getConnectionConstraint(F,u,!1):null;this.setConnectionConstraint(g,l,!0,la);this.setConnectionConstraint(g,k,!1,p);var A=mxUtils.getValue(F.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(F.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[g]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-A,[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 x=m.width;m.width=m.height;m.height=x;f.setGeometry(g,m)}var J=this.view.getState(g);if(null!=J){var t=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],I=mxUtils.getValue(J.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 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=
+(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 F=this.view.getState(g),v=this.view.getState(l),u=this.view.getState(k);if(null!=F){var n=null!=v?this.getConnectionConstraint(F,v,!0):null,la=null!=u?this.getConnectionConstraint(F,u,!1):null;this.setConnectionConstraint(g,l,!0,la);this.setConnectionConstraint(g,k,!1,n);var A=mxUtils.getValue(F.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(F.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[g]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,
+A,[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 x=m.width;m.width=m.height;m.height=x;f.setGeometry(g,m)}var J=this.view.getState(g);if(null!=J){var t=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],y=mxUtils.getValue(J.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);
+this.setCellStyles(mxConstants.STYLE_DIRECTION,t[mxUtils.mod(mxUtils.indexOf(t,y)+(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&&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);
@@ -2563,31 +2564,31 @@ mouseMove:function(b,d){if(l.isMouseDown){if(null!=this.currentLink){var f=Math.
d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d))}},mouseUp:function(b,c){for(var e=c.getSource(),k=c.getEvent();null!=e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-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 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 F=
-q.getIndex(b[f]);c.add(q,m[f],F+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);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",m))}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"),
+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 F=
+p.getIndex(b[f]);c.add(p,m[f],F+1)}if(this.isTable(p)){var v=this.getCellGeometry(m[f]),u=this.getCellGeometry(p);null!=v&&null!=u&&(u=u.clone(),u.height+=v.height,c.setGeometry(p,u))}}else g.push(m[f])}this.updateCustomLinks(this.createCellMapping(l,k),m,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",m))}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 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};
+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,q,n,F,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 A="page"==v?this.view.getBackgroundPageBounds():g&&null==p||c||"diagram"==v?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),x=this.view.scale;"diagram"==v&&null!=this.backgroundImage&&(A=
+function(b,d,f,c,e,g,l,k,m,p,q,F,v,u){var n=null;if(null!=u)for(n=new mxDictionary,q=0;q<u.length;q++)n.put(u[q],!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 A="page"==v?this.view.getBackgroundPageBounds():g&&null==n||c||"diagram"==v?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),x=this.view.scale;"diagram"==v&&null!=this.backgroundImage&&(A=
mxRectangle.fromRectangle(A),A.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*x,(this.view.translate.y+this.backgroundImage.y)*x,this.backgroundImage.width*x,this.backgroundImage.height*x)));if(null==A)throw Error(mxResources.get("drawingEmpty"));var J=mxUtils.createXmlDocument(),t=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,"svg"):J.createElement("svg");null!=b&&(null!=t.style?t.style.backgroundColor=b:t.setAttribute("style","background-color:"+b));null==J.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/x;var I=Math.max(1,Math.ceil(A.width*b)+2*f)+(q?5:0),y=Math.max(1,Math.ceil(A.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);J.appendChild(t);var D=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,
-"g"):J.createElement("g");t.appendChild(D);var B=this.createSvgCanvas(D);B.foOffset=e?-.5:0;B.textOffset=e?-.5:0;B.imageOffset=e?-.5:0;B.translate(Math.floor(f/d-A.x/x),Math.floor(f/d-A.y/x));var aa=document.createElement("div"),la=B.getAlternateText;B.getAlternateText=function(b,d,f,c,e,g,l,k,m,q,n,z,ua){if(null!=g&&0<this.state.fontSize)try{mxUtils.isNode(g)?g=g.innerText:(aa.innerHTML=g,g=mxUtils.extractTextWithWhitespace(aa.childNodes));for(var Wa=Math.ceil(2*c/this.state.fontSize),ra=[],Ca=0,
+(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/x;var y=Math.max(1,Math.ceil(A.width*b)+2*f)+(p?5:0),I=Math.max(1,Math.ceil(A.height*b)+2*f)+(p?5:0);t.setAttribute("version","1.1");t.setAttribute("width",y+"px");t.setAttribute("height",I+"px");t.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+y+" "+I);J.appendChild(t);var D=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,
+"g"):J.createElement("g");t.appendChild(D);var B=this.createSvgCanvas(D);B.foOffset=e?-.5:0;B.textOffset=e?-.5:0;B.imageOffset=e?-.5:0;B.translate(Math.floor(f/d-A.x/x),Math.floor(f/d-A.y/x));var aa=document.createElement("div"),la=B.getAlternateText;B.getAlternateText=function(b,d,f,c,e,g,l,k,m,p,q,z,ua){if(null!=g&&0<this.state.fontSize)try{mxUtils.isNode(g)?g=g.innerText:(aa.innerHTML=g,g=mxUtils.extractTextWithWhitespace(aa.childNodes));for(var Wa=Math.ceil(2*c/this.state.fontSize),ra=[],Ca=0,
F=0;(0==Wa||Ca<Wa)&&F<g.length;){var Ua=g.charCodeAt(F);if(10==Ua||13==Ua){if(0<Ca)break}else ra.push(g.charAt(F)),255>Ua&&Ca++;F++}ra.length<g.length&&1<g.length-ra.length&&(g=mxUtils.trim(ra.join(""))+"...");return g}catch(gb){return la.apply(this,arguments)}else return la.apply(this,arguments)};var N=this.backgroundImage;if(null!=N){d=x/d;var P=this.view.translate,ta=new mxRectangle((N.x+P.x)*d,(N.y+P.y)*d,N.width*d,N.height*d);mxUtils.intersects(A,ta)&&B.image(N.x+P.x,N.y+P.y,N.width,N.height,
-N.src,!0)}B.scale(b);B.textEnabled=l;k=null!=k?k:this.createSvgImageExport();var ba=k.drawCellState,W=k.getLinkForCellState;k.getLinkForCellState=function(b,d){var f=W.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!=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)&&ba.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),B);this.updateSvgLinks(t,m,!0);this.addForeignObjectWarning(B,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",
+N.src,!0)}B.scale(b);B.textEnabled=l;k=null!=k?k:this.createSvgImageExport();var ba=k.drawCellState,W=k.getLinkForCellState;k.getLinkForCellState=function(b,d){var f=W.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!=n?n.get(b.cell):f.isCellSelected(b.cell),e=f.model.getParent(b.cell);!(g&&null==n||c)&&null!=e;)c=null!=n?
+n.get(e):f.isCellSelected(e),e=f.model.getParent(e);(g&&null==n||c)&&ba.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),B);this.updateSvgLinks(t,m,!0);this.addForeignObjectWarning(B,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&&(b=document.selection.createRange().parentElement());return b};Graph.prototype.getSelectedEditingElement=function(){for(var b=
this.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;null!=b&&b==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=this.cellEditor.textarea.firstChild);return b};Graph.prototype.getParentByName=function(b,d,f){for(;null!=b&&b.nodeName!=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],q=f.cloneCell(m,!1),n=this.getCellGeometry(q);q.value=null;if(null!=n){var k=n.width,F=this.getCellGeometry(l[g]);
-null!=F&&(n.height=F.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();
+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,F=this.getCellGeometry(l[g]);
+null!=F&&(q.height=F.height)}f.add(l[g],p,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 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()}};
+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);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);
@@ -2628,9 +2629,9 @@ b.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(b,d){return this.gr
var O=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return O.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 da=mxVertexHandler.prototype.isParentHighlightVisible;
mxVertexHandler.prototype.isParentHighlightVisible=function(){return da.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 Q=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return Q.apply(this,arguments).grow(-this.getSelectionBorderInset())};var X=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=X.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]),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 F=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==F?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+(q.width+
-F)*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){F=Math.max(Graph.minTableColumnWidth-q.width,d.x-b.x-q.width);v=mxEvent.isShiftDown(f.getEvent());null==n||v||(F=Math.min(F,n.width-Graph.minTableColumnWidth))};l.execute=function(b){if(0!=F)d.setTableColumnWidth(this.state.cell,F,v);
+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 F=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==F?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+(p.width+
+F)*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){F=Math.max(Graph.minTableColumnWidth-p.width,d.x-b.x-p.width);v=mxEvent.isShiftDown(f.getEvent());null==q||v||(F=Math.min(F,q.width-Graph.minTableColumnWidth))};l.execute=function(b){if(0!=F)d.setTableColumnWidth(this.state.cell,F,v);
else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}F=0};l.positionChanged=function(){};l.reset=function(){F=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 F=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){F.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=
@@ -2656,7 +2657,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]),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,
+(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,
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=
@@ -2685,33 +2686,33 @@ d=this.cornerHandles,f=d[0].bounds.height/2;d[0].bounds.x=this.state.x-d[0].boun
function(){S.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 ea=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
function(){if(null!=this.marker&&(ea.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 ha=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ha.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.visibility="")};var ia=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ia.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 m(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1}function q(){mxActor.call(this)}function n(){mxCylinder.call(this)}
+null!=this.linkHint&&(this.linkHint.style.visibility="")};var ia=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ia.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 u(){mxCylinder.call(this)}function v(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function C(){mxActor.call(this)}function H(){mxActor.call(this)}function D(){mxActor.call(this)}function E(){mxActor.call(this)}function M(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,M.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
this.canvas.moveTo=mxUtils.bind(this,M.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,M.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,M.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,M.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,M.prototype.arcTo)}function G(){mxRectangleShape.call(this)}function K(){mxRectangleShape.call(this)}
function B(){mxActor.call(this)}function L(){mxActor.call(this)}function O(){mxActor.call(this)}function da(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function Q(){mxCylinder.call(this)}function X(){mxShape.call(this)}function F(){mxShape.call(this)}function J(){mxEllipse.call(this)}function A(){mxShape.call(this)}function aa(){mxShape.call(this)}function I(){mxRectangleShape.call(this)}function W(){mxShape.call(this)}function ba(){mxShape.call(this)}function oa(){mxShape.call(this)}
function fa(){mxShape.call(this)}function ja(){mxShape.call(this)}function na(){mxCylinder.call(this)}function pa(){mxCylinder.call(this)}function ka(){mxRectangleShape.call(this)}function Y(){mxDoubleEllipse.call(this)}function Z(){mxDoubleEllipse.call(this)}function R(){mxArrowConnector.call(this);this.spacing=0}function sa(){mxArrowConnector.call(this);this.spacing=0}function U(){mxActor.call(this)}function T(){mxRectangleShape.call(this)}function ma(){mxActor.call(this)}function va(){mxActor.call(this)}
function S(){mxActor.call(this)}function ea(){mxActor.call(this)}function ha(){mxActor.call(this)}function ia(){mxActor.call(this)}function la(){mxActor.call(this)}function ta(){mxActor.call(this)}function P(){mxActor.call(this)}function ca(){mxActor.call(this)}function wa(){mxEllipse.call(this)}function ya(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}function za(){mxRhombus.call(this)}function Aa(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}
-function Ka(){mxEllipse.call(this)}function Ba(){mxActor.call(this)}function Ha(){mxActor.call(this)}function Fa(){mxActor.call(this)}function V(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 xa(){mxConnector.call(this)}function Oa(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,
+function Ka(){mxEllipse.call(this)}function Ba(){mxActor.call(this)}function Ha(){mxActor.call(this)}function Fa(){mxActor.call(this)}function V(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 xa(){mxConnector.call(this)}function Oa(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,
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"),ua="0"!=mxUtils.getValue(this.state.style,"columnLines","1"),m=z.getCellGeometry(l[0]),ra=z.model.getChildCells(l[0],!0),ra=[{y:null!=m?m.y+m.height:0,x:0,cells:ra,colspans:[]}];if(k)for(k=1;k<l.length;k++){var m=z.getCellGeometry(l[k]),q={y:0,cells:z.model.getChildCells(l[k],!0),colspans:[]};ra.push(q);if(null!=m){q.y=m.y+m.height;b.begin();b.moveTo(d+g.x,f+m.y);for(var n=0,Ca=
-0;Ca<q.cells.length;Ca++)z.model.isVisible(q.cells[Ca])?n=q.x:(0<n&&b.lineTo(d+n-g.width,f+m.y),b.moveTo(d+m.x+m.width+g.x,f+m.y),n=0);b.lineTo(d+c-g.width,f+m.y);b.end();b.stroke()}}if(ua)for(c=ra[0].cells,k=1;k<c.length;k++)if(m=z.getCellGeometry(c[k]),null!=m){b.begin();b.moveTo(d+m.x+g.x,f+g.y);for(var Ca=l=0;Ca<ra.length;Ca++)q=ra[Ca],ua=1==k?parseInt(z.getCurrentCellStyle(q.cells[k-1]).colspan||1):ra[Ca].colspans[k-1],q.colspans[k]=ua-1,1>q.colspans[k]?(q.colspans[k]=parseInt(z.getCurrentCellStyle(q.cells[k]).colspan||
-1),l=q.y):(0<l&&b.lineTo(d+m.x+g.x,f+l-g.height),b.moveTo(d+m.x+g.x,f+q.y),l=0);b.lineTo(d+m.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",
+l=z.model.getChildCells(this.state.cell,!0);if(0<l.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),ua="0"!=mxUtils.getValue(this.state.style,"columnLines","1"),m=z.getCellGeometry(l[0]),ra=z.model.getChildCells(l[0],!0),ra=[{y:null!=m?m.y+m.height:0,x:0,cells:ra,colspans:[]}];if(k)for(k=1;k<l.length;k++){var m=z.getCellGeometry(l[k]),p={y:0,cells:z.model.getChildCells(l[k],!0),colspans:[]};ra.push(p);if(null!=m){p.y=m.y+m.height;b.begin();b.moveTo(d+g.x,f+m.y);for(var q=0,Ca=
+0;Ca<p.cells.length;Ca++)z.model.isVisible(p.cells[Ca])?q=p.x:(0<q&&b.lineTo(d+q-g.width,f+m.y),b.moveTo(d+m.x+m.width+g.x,f+m.y),q=0);b.lineTo(d+c-g.width,f+m.y);b.end();b.stroke()}}if(ua)for(c=ra[0].cells,k=1;k<c.length;k++)if(m=z.getCellGeometry(c[k]),null!=m){b.begin();b.moveTo(d+m.x+g.x,f+g.y);for(var Ca=l=0;Ca<ra.length;Ca++)p=ra[Ca],ua=1==k?parseInt(z.getCurrentCellStyle(p.cells[k-1]).colspan||1):ra[Ca].colspans[k-1],p.colspans[k]=ua-1,1>p.colspans[k]?(p.colspans[k]=parseInt(z.getCurrentCellStyle(p.cells[k]).colspan||
+1),l=p.y):(0<l&&b.lineTo(d+m.x+g.x,f+l-g.height),b.moveTo(d+m.x+g.x,f+p.y),l=0);b.lineTo(d+m.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 La=Math.tan(mxUtils.toRadians(30)),
Ja=(.5-La)/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/La);b.translate((c-d)/2,(e-d)/2+d/4);b.moveTo(0,.25*d);b.lineTo(.5*d,d*Ja);b.lineTo(d,.25*d);b.lineTo(.5*d,(.5-Ja)*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+La));g?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ja)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ja)*d),b.lineTo(.5*d,(1-Ja)*d)):(b.translate((c-d)/2,(e-d)/2),b.moveTo(0,.25*
-d),b.lineTo(.5*d,d*Ja),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ja)*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=
+d),b.lineTo(.5*d,d*Ja),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ja)*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,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(q,mxActor);q.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",q);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,
+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))));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",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,
+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,"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(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,
@@ -2720,7 +2721,7 @@ function(){return!0};v.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Mat
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};n.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};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(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(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):
@@ -2745,8 +2746,8 @@ mxUtils.extend(O,mxHexagon);O.prototype.size=.25;O.prototype.fixedSize=20;O.prot
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",O);mxUtils.extend(da,mxRectangleShape);da.prototype.isHtmlAllowed=function(){return!1};da.prototype.paintForeground=function(b,d,f,c,e){var g=Math.min(c/5,e/5)+1;b.begin();b.moveTo(d+c/2,f+g);b.lineTo(d+c/2,f+e-g);b.moveTo(d+g,f+e/2);b.lineTo(d+c-g,f+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
mxCellRenderer.registerShape("plus",da);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 g=2*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&&(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"],q=this.style["symbol"+g+"Height"],n=this.style["symbol"+g+"Spacing"]||0,F=this.style["symbol"+g+"VSpacing"]||n,ua=
-this.style["symbol"+g+"ArcSpacing"];null!=ua&&(ua*=this.getArcSize(c+this.strokewidth,e+this.strokewidth),n+=ua,F+=ua);var ua=d,ra=f,ua=l==mxConstants.ALIGN_CENTER?ua+(c-m)/2:l==mxConstants.ALIGN_RIGHT?ua+(c-m-n):ua+n,ra=k==mxConstants.ALIGN_MIDDLE?ra+(e-q)/2:k==mxConstants.ALIGN_BOTTOM?ra+(e-q-F):ra+F;b.save();l=new z;l.style=this.style;z.prototype.paintVertexShape.call(l,b,ua,ra,m,q);b.restore()}g++}while(null!=z)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
+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,F=this.style["symbol"+g+"VSpacing"]||q,ua=
+this.style["symbol"+g+"ArcSpacing"];null!=ua&&(ua*=this.getArcSize(c+this.strokewidth,e+this.strokewidth),q+=ua,F+=ua);var ua=d,ra=f,ua=l==mxConstants.ALIGN_CENTER?ua+(c-m)/2:l==mxConstants.ALIGN_RIGHT?ua+(c-m-q):ua+q,ra=k==mxConstants.ALIGN_MIDDLE?ra+(e-p)/2:k==mxConstants.ALIGN_BOTTOM?ra+(e-p-F):ra+F;b.save();l=new z;l.style=this.style;z.prototype.paintVertexShape.call(l,b,ua,ra,m,p);b.restore()}g++}while(null!=z)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
N);mxUtils.extend(Q,mxCylinder);Q.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",Q);mxUtils.extend(X,mxShape);X.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",X);mxUtils.extend(F,mxShape);F.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};F.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",
F);mxUtils.extend(J,mxEllipse);J.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",J);mxUtils.extend(A,mxShape);A.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",A);mxUtils.extend(aa,mxShape);
@@ -2763,12 +2764,12 @@ d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?C.prototype.fixe
k,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]):(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,z),new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,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("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,
"fixedSize","0"),g=e?H.prototype.fixedSize:H.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?L.prototype.fixedSize:L.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!=
+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?L.prototype.fixedSize:L.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(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?O.prototype.fixedSize:O.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(ba,mxShape);ba.prototype.size=10;ba.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",ba);mxUtils.extend(oa,
+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?O.prototype.fixedSize:O.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(ba,mxShape);ba.prototype.size=10;ba.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",ba);mxUtils.extend(oa,
mxShape);oa.prototype.size=10;oa.prototype.inset=2;oa.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",oa);mxUtils.extend(fa,
mxShape);fa.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",fa);mxUtils.extend(ja,mxShape);ja.prototype.inset=2;ja.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",ja);mxUtils.extend(na,mxCylinder);na.prototype.jettyWidth=20;na.prototype.jettyHeight=10;na.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));f=l/2;var l=f+l/2,z=Math.min(d,e-d),k=Math.min(z+2*d,e-d);g?(b.moveTo(f,z),b.lineTo(l,z),b.lineTo(l,z+d),b.lineTo(f,z+d),b.moveTo(f,
@@ -2802,57 +2803,57 @@ defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enu
{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"}]}];V.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,
-f);this.strictDrawShape(b,0,0,c,e)};V.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)))),F=g&&g.dashed?g.dashed:mxUtils.getValue(this.style,"dashed",!1),z=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),A=g&&g.bottom?g.bottom:mxUtils.getValue(this.style,"bottom",!0),x=g&&g.left?g.left:mxUtils.getValue(this.style,
-"left",!0),J=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"),D=g&&g.fillColor?g.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");g&&g.strokeColor||mxUtils.getValue(this.style,
+f);this.strictDrawShape(b,0,0,c,e)};V.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)))),F=g&&g.dashed?g.dashed:mxUtils.getValue(this.style,"dashed",!1),z=g&&g.dashPattern?g.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),v=g&&g.relIndent?g.relIndent:Math.max(0,Math.min(50,q)),u=g&&g.top?g.top:mxUtils.getValue(this.style,"top",!0),n=g&&g.right?g.right:mxUtils.getValue(this.style,"right",!0),A=g&&g.bottom?g.bottom:mxUtils.getValue(this.style,"bottom",!0),x=g&&g.left?g.left:mxUtils.getValue(this.style,
+"left",!0),J=g&&g.topLeftStyle?g.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),t=g&&g.topRightStyle?g.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),y=g&&g.bottomRightStyle?g.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),I=g&&g.bottomLeftStyle?g.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),D=g&&g.fillColor?g.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");g&&g.strokeColor||mxUtils.getValue(this.style,
"strokeColor","#000000");var B=g&&g.strokeWidth?g.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),aa=g&&g.fillColor2?g.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),N=g&&g.gradientColor2?g.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),ra=g&&g.gradientDirection2?g.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),ba=g&&g.opacity?g.opacity:mxUtils.getValue(this.style,"opacity","100"),ua=Math.max(0,Math.min(50,m));g=V.prototype;
-b.setDashed(F);z&&""!=z&&b.setDashPattern(z);b.setStrokeWidth(B);m=Math.min(.5*e,.5*c,m);k||(m=ua*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||A||x)&&"frame"!=q&&(b.begin(),u?g.moveNW(b,d,f,c,e,l,J,m,x):b.moveTo(0,0),u&&g.paintNW(b,d,f,c,e,l,J,m,x),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,A),A&&g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,x),x&&g.paintSW(b,
-d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(aa),F=k=ba,"none"==aa&&(k=0),"none"==N&&(F=0),b.setGradient(aa,N,0,0,c,e,ra,k,F),b.begin(),u?g.moveNWInner(b,d,f,c,e,l,J,m,n,u,x):b.moveTo(n,0),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),x&&A&&g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),A&&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,J,m,n,x,u),u&&x&&g.paintNWInner(b,d,f,c,e,l,J,m,n),b.fill(),"none"==D&&(b.begin(),g.paintFolds(b,d,f,c,e,l,J,t,I,y,m,u,p,A,x),b.stroke()));u||p||A||!x?u||p||!A||x?!u&&!p&&A&&x?"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,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,J,m,n,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A)),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,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.lineNWInner(b,d,f,c,e,l,J,m,n,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),b.close(),b.fillAndStroke()):u||!p||A||x?!u&&p&&!A&&x?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,J,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,J,m,n,u,x),g.paintLeftInner(b,d,f,c,e,l,
-y,m,n,A,x)),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,A),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,I,m,n,A),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,J,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.lineNWInner(b,d,f,c,e,l,J,m,n,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),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,A),g.lineSEInner(b,d,f,c,e,l,I,m,n,A),g.paintRightInner(b,d,f,c,
-e,l,t,m,n,u,p),b.close(),b.fillAndStroke()):!u&&p&&A&&!x?"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,A),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,x),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,x),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),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,A),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,
-e,l,y,m,x),g.lineSWInner(b,d,f,c,e,l,y,m,n,x),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),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&&A&&x?"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,A),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,J,m,n,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),g.paintSWInner(b,
-d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),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,A),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.lineNWInner(b,d,f,c,e,l,J,m,n,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),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||A||x?u&&!p&&!A&&x?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),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,J,m,n,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,
-d,f,c,e,l,J,m,x),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,J,m,n,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),b.close(),b.fillAndStroke()):u&&!p&&A&&!x?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),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,J,m,n,x,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,x),"double"==q&&
-(g.moveSWInner(b,d,f,c,e,l,y,m,n,x),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),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,J,m,n,x,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,x),g.lineSWInner(b,d,f,c,e,l,y,m,n,x),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),b.close(),b.fillAndStroke()):u&&!p&&A&&x?"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,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),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,J,m,n,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A)),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,x),g.paintSW(b,d,f,c,e,l,y,
-m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),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,J,m,n,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),b.close(),b.fillAndStroke()):u&&p&&!A&&!x?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),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,
-A),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,I,m,n,A),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,J,m,n,x,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),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,A),g.lineSEInner(b,d,f,c,e,l,I,m,n,A),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,J,m,n,x,u),b.close(),b.fillAndStroke()):u&&p&&!A&&x?"frame"!=
-q?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),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,A),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,I,m,n,A),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,J,m,n,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,
-e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),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,A),g.lineSEInner(b,d,f,c,e,l,I,m,n,A),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,J,m,n,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),b.close(),b.fillAndStroke()):u&&p&&A&&!x?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),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,A),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,x),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,x),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),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,J,m,n,x,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),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,A),g.paintSE(b,d,f,c,e,l,
-I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,x),g.lineSWInner(b,d,f,c,e,l,y,m,n,x),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),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,J,m,n,x,u),b.close(),b.fillAndStroke()):u&&p&&A&&x&&("frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintNW(b,d,f,c,e,l,J,m,x),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,A),g.paintSE(b,d,f,c,e,l,I,
-m,p),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),b.close(),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,x),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),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,J,m,n,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),b.close()),b.stroke()):(b.begin(),g.moveNW(b,
-d,f,c,e,l,J,m,x),g.paintNW(b,d,f,c,e,l,J,m,x),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,A),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),b.close(),g.moveSWInner(b,d,f,c,e,l,y,m,n,x),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),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,J,m,n,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),b.close(),b.fillAndStroke())):"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),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,J,m,n,x,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),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,J,m,n,x,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,A),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,I,m,n,A),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,A),g.lineSEInner(b,d,f,c,e,l,I,m,n,A),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,x),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,x),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A)),
-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,x),g.lineSWInner(b,d,f,c,e,l,y,m,n,x),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,J,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,J,m,n,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,J,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.lineNWInner(b,d,f,c,e,l,J,m,n,u,x),g.paintLeftInner(b,
-d,f,c,e,l,y,m,n,A,x),b.close(),b.fillAndStroke());b.begin();g.paintFolds(b,d,f,c,e,l,J,t,I,y,m,u,p,A,x);b.stroke()};V.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)};V.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)};V.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)};V.prototype.moveSW=function(b,
+b.setDashed(F);z&&""!=z&&b.setDashPattern(z);b.setStrokeWidth(B);m=Math.min(.5*e,.5*c,m);k||(m=ua*Math.min(c,e)/100);m=Math.min(m,.5*Math.min(c,e));k||(q=Math.min(v*Math.min(c,e)/100));q=Math.min(q,.5*Math.min(c,e)-m);(u||n||A||x)&&"frame"!=p&&(b.begin(),u?g.moveNW(b,d,f,c,e,l,J,m,x):b.moveTo(0,0),u&&g.paintNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),n&&g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),A&&g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),x&&g.paintSW(b,
+d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(aa),F=k=ba,"none"==aa&&(k=0),"none"==N&&(F=0),b.setGradient(aa,N,0,0,c,e,ra,k,F),b.begin(),u?g.moveNWInner(b,d,f,c,e,l,J,m,q,u,x):b.moveTo(q,0),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),x&&A&&g.paintSWInner(b,d,f,c,e,l,I,m,q,A),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),A&&n&&g.paintSEInner(b,d,f,c,e,l,y,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),n&&u&&g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,
+d,f,c,e,l,J,m,q,x,u),u&&x&&g.paintNWInner(b,d,f,c,e,l,J,m,q),b.fill(),"none"==D&&(b.begin(),g.paintFolds(b,d,f,c,e,l,J,t,y,I,m,u,n,A,x),b.stroke()));u||n||A||!x?u||n||!A||x?!u&&!n&&A&&x?"frame"!=p?(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.paintSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),"double"==p&&(g.moveNWInner(b,d,f,c,e,l,J,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),g.paintSWInner(b,d,f,c,e,l,I,m,q,A),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A)),b.stroke()):
+(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.paintSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.lineNWInner(b,d,f,c,e,l,J,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),g.paintSWInner(b,d,f,c,e,l,I,m,q,A),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),b.close(),b.fillAndStroke()):u||!n||A||x?!u&&n&&!A&&x?"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,J,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),"double"==p&&(g.moveNWInner(b,d,f,c,e,l,J,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,
+I,m,q,A,x)),b.stroke(),b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,y,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,J,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.lineNWInner(b,d,f,c,e,l,J,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),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,y,m,A),g.lineSEInner(b,d,f,c,e,l,y,m,q,A),g.paintRightInner(b,d,f,c,
+e,l,t,m,q,u,n),b.close(),b.fillAndStroke()):!u&&n&&A&&!x?"frame"!=p?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,I,m,q,x),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,y,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,
+e,l,I,m,x),g.lineSWInner(b,d,f,c,e,l,I,m,q,x),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,y,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),b.close(),b.fillAndStroke()):!u&&n&&A&&x?"frame"!=p?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.paintSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),"double"==p&&(g.moveNWInner(b,d,f,c,e,l,J,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),g.paintSWInner(b,
+d,f,c,e,l,I,m,q,A),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,y,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.paintSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.lineNWInner(b,d,f,c,e,l,J,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),g.paintSWInner(b,d,f,c,e,l,I,m,q,A),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),g.paintSEInner(b,
+d,f,c,e,l,y,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),b.close(),b.fillAndStroke()):!u||n||A||x?u&&!n&&!A&&x?"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,q),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,
+d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,q),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),b.close(),b.fillAndStroke()):u&&!n&&A&&!x?"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u)),b.stroke(),b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),"double"==p&&
+(g.moveSWInner(b,d,f,c,e,l,I,m,q,x),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),b.close(),b.fillAndStroke(),b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.lineSWInner(b,d,f,c,e,l,I,m,q,x),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),b.close(),b.fillAndStroke()):u&&!n&&A&&x?"frame"!=p?(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),
+g.paintBottom(b,d,f,c,e,l,I,m,x),g.paintSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,q),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),g.paintSWInner(b,d,f,c,e,l,I,m,q,A),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.paintSW(b,d,f,c,e,l,I,
+m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,q),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),g.paintSWInner(b,d,f,c,e,l,I,m,q,A),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),b.close(),b.fillAndStroke()):u&&n&&!A&&!x?"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,
+A),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,y,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.lineSEInner(b,d,f,c,e,l,y,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),b.close(),b.fillAndStroke()):u&&n&&!A&&x?"frame"!=
+p?(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,y,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,q),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,
+e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.lineSEInner(b,d,f,c,e,l,y,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,q),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),b.close(),b.fillAndStroke()):u&&n&&A&&!x?"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,
+u),g.paintRight(b,d,f,c,e,l,y,m,A),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,I,m,q,x),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,y,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.paintSE(b,d,f,c,e,l,
+y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.lineSWInner(b,d,f,c,e,l,I,m,q,x),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,y,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),b.close(),b.fillAndStroke()):u&&n&&A&&x&&("frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.paintSE(b,d,f,c,e,l,y,
+m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.paintSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),b.close(),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,I,m,q,x),g.paintSWInner(b,d,f,c,e,l,I,m,q,A),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,y,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,q),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),b.close()),b.stroke()):(b.begin(),g.moveNW(b,
+d,f,c,e,l,J,m,x),g.paintNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.paintSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),b.close(),g.moveSWInner(b,d,f,c,e,l,I,m,q,x),g.paintSWInner(b,d,f,c,e,l,I,m,q,A),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,y,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,
+d,f,c,e,l,J,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,q),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),b.close(),b.fillAndStroke())):"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),b.close(),b.fillAndStroke()):"frame"!=p?(b.begin(),g.moveNE(b,
+d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,y,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.lineSEInner(b,d,f,c,e,l,y,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),b.close(),b.fillAndStroke()):"frame"!=p?(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,I,m,q,x),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A)),
+b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.lineSWInner(b,d,f,c,e,l,I,m,q,x),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),b.close(),b.fillAndStroke()):"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,J,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),"double"==p&&(g.moveNWInner(b,d,f,c,e,l,J,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,J,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.lineNWInner(b,d,f,c,e,l,J,m,q,u,x),g.paintLeftInner(b,
+d,f,c,e,l,I,m,q,A,x),b.close(),b.fillAndStroke());b.begin();g.paintFolds(b,d,f,c,e,l,J,t,y,I,m,u,n,A,x);b.stroke()};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.prototype.paintRightInner=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)};V.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)};V.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)};V.prototype.paintBottomInner=function(b,d,f,c,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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.prototype.paintFolds=function(b,d,f,c,e,g,l,m,k,n,q,F,u,p,A){if("fold"==g||"fold"==l||"fold"==m||"fold"==k||"fold"==n)("fold"==l||"default"==l&&"fold"==g)&&F&&A&&(b.moveTo(0,q),b.lineTo(q,q),
-b.lineTo(q,0)),("fold"==m||"default"==m&&"fold"==g)&&F&&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&&A&&(b.moveTo(0,e-q),b.lineTo(q,e-q),b.lineTo(q,e))};mxCellRenderer.registerShape(V.prototype.cst.RECT2,V);V.prototype.constraints=null;mxUtils.extend(xa,mxConnector);xa.prototype.origPaintEdgeShape=xa.prototype.paintEdgeShape;xa.prototype.paintEdgeShape=function(b,
+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)};V.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&&"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)};V.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)};V.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)};V.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"==l&&"snip"==g?b.lineTo(k,e-m-.5*k):b.lineTo(k,e-m-k):b.lineTo(k,e):b.lineTo(0,
+e)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.prototype.paintFolds=function(b,d,f,c,e,g,l,m,k,q,p,F,u,n,A){if("fold"==g||"fold"==l||"fold"==m||"fold"==k||"fold"==q)("fold"==l||"default"==l&&"fold"==g)&&F&&A&&(b.moveTo(0,p),b.lineTo(p,p),
+b.lineTo(p,0)),("fold"==m||"default"==m&&"fold"==g)&&F&&u&&(b.moveTo(c-p,0),b.lineTo(c-p,p),b.lineTo(c,p)),("fold"==k||"default"==k&&"fold"==g)&&n&&u&&(b.moveTo(c-p,e),b.lineTo(c-p,e-p),b.lineTo(c,e-p)),("fold"==q||"default"==q&&"fold"==g)&&n&&A&&(b.moveTo(0,e-p),b.lineTo(p,e-p),b.lineTo(p,e))};mxCellRenderer.registerShape(V.prototype.cst.RECT2,V);V.prototype.constraints=null;mxUtils.extend(xa,mxConnector);xa.prototype.origPaintEdgeShape=xa.prototype.paintEdgeShape;xa.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;xa.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),xa.prototype.origPaintEdgeShape.apply(this,[b,d,f])))};mxCellRenderer.registerShape("filledEdge",xa);"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,n){var q=e*(l+k+1),F=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-q/2-F/2,c.y-F/2+q/2);b.lineTo(c.x+F/2-3*q/2,c.y-3*F/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),F=g*(l+k+1),u=c.x+q/2,p=c.y+F/2;c.x-=q;c.y-=F;return function(){b.begin();b.moveTo(u-q/2-F/2,p-F/2+q/2);b.lineTo(u-q/2+F/2,p-F/2-q/2);b.lineTo(u+F/2-3*q/2,p-3*F/2-q/2);b.lineTo(u-F/2-3*q/2,p-3*F/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),F=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-q/2-F/2,c.y-F/2+q/2);b.lineTo(c.x+F/2-3*q/2,c.y-3*F/2-q/2);b.moveTo(c.x-q/2+F/2,c.y-F/2-q/2);b.lineTo(c.x-F/2-3*q/2,c.y-
-3*F/2+q/2);b.stroke()}});mxMarker.addMarker("circle",Oa);mxMarker.addMarker("circlePlus",function(b,d,f,c,e,g,l,m,k,n){var q=c.clone(),F=Oa.apply(this,arguments),u=e*(l+2*k),p=g*(l+2*k);return function(){F.apply(this,arguments);b.begin();b.moveTo(q.x-e*k,q.y-g*k);b.lineTo(q.x-2*u+e*k,q.y-2*p+g*k);b.moveTo(q.x-u-p+g*k,q.y-p+u-e*k);b.lineTo(q.x+p-u-g*k,q.y-p-u+e*k);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,f,c,e,g,l,m,k,q){var n=e*(l+k+1),F=g*(l+k+1),u=c.clone();c.x-=n;c.y-=F;return function(){b.begin();
-b.moveTo(u.x-F,u.y+n);b.quadTo(c.x-F,c.y+n,c.x,c.y);b.quadTo(c.x+F,c.y-n,u.x+F,u.y-n);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 F=e.clone();return function(){d.begin();d.moveTo(F.x,F.y);k?d.lineTo(F.x-g-l/b,F.y-l+g/b):d.lineTo(F.x+l/b-g,F.y-l-g/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(b,d,f){return Na(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})},Na=
-function(b,d,f,c,e){return ga(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,F=Math.sqrt(m*m+q*q);c.x=(c.x+d.x)*k;c.y=(c.y+d.y)*k;e.call(this,F,m/F,q/F,n,l,c,g)})},Ia=function(b){return function(d){return[ga(d,
+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),F=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-p/2-F/2,c.y-F/2+p/2);b.lineTo(c.x+F/2-3*p/2,c.y-3*F/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),F=g*(l+k+1),u=c.x+p/2,n=c.y+F/2;c.x-=p;c.y-=F;return function(){b.begin();b.moveTo(u-p/2-F/2,n-F/2+p/2);b.lineTo(u-p/2+F/2,n-F/2-p/2);b.lineTo(u+F/2-3*p/2,n-3*F/2-p/2);b.lineTo(u-F/2-3*p/2,n-3*F/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),F=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-p/2-F/2,c.y-F/2+p/2);b.lineTo(c.x+F/2-3*p/2,c.y-3*F/2-p/2);b.moveTo(c.x-p/2+F/2,c.y-F/2-p/2);b.lineTo(c.x-F/2-3*p/2,c.y-
+3*F/2+p/2);b.stroke()}});mxMarker.addMarker("circle",Oa);mxMarker.addMarker("circlePlus",function(b,d,f,c,e,g,l,m,k,q){var p=c.clone(),F=Oa.apply(this,arguments),u=e*(l+2*k),n=g*(l+2*k);return function(){F.apply(this,arguments);b.begin();b.moveTo(p.x-e*k,p.y-g*k);b.lineTo(p.x-2*u+e*k,p.y-2*n+g*k);b.moveTo(p.x-u-n+g*k,p.y-n+u-e*k);b.lineTo(p.x+n-u-g*k,p.y-n-u+e*k);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,f,c,e,g,l,m,k,p){var q=e*(l+k+1),F=g*(l+k+1),u=c.clone();c.x-=q;c.y-=F;return function(){b.begin();
+b.moveTo(u.x-F,u.y+q);b.quadTo(c.x-F,c.y+q,c.x,c.y);b.quadTo(c.x+F,c.y-q,u.x+F,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 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 F=e.clone();return function(){d.begin();d.moveTo(F.x,F.y);k?d.lineTo(F.x-g-l/b,F.y-l+g/b):d.lineTo(F.x+l/b-g,F.y-l-g/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(b,d,f){return Na(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})},Na=
+function(b,d,f,c,e){return ga(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,F=Math.sqrt(m*m+q*q);c.x=(c.x+d.x)*k;c.y=(c.y+d.y)*k;e.call(this,F,m/F,q/F,p,l,c,g)})},Ia=function(b){return function(d){return[ga(d,
["arrowWidth","arrowSize"],function(d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ea.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",ea.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[ga(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)]}},Ta=function(b,d,f){return function(c){var e=[ga(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(Ga(c));return e}},Pa=function(b,d,f,c,e){f=null!=f?f:.5;return function(g){var l=[ga(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,
@@ -2885,8 +2886,8 @@ this.state.style.base=Math.round(Math.max(0,Math.min(b.width,d.x-b.x-f*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(Ga(b));return d},module:function(b){return[ga(b,["jettyWidth","jettyHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"jettyWidth",na.prototype.jettyWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"jettyHeight",na.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[ga(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ma.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ma.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[ga(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",S.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",S.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:Ia(1),doubleArrow:Ia(.5),folder:function(b){return[ga(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[ga(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,
+Math.min(b.height,d.y-b.y)))},!1)]},singleArrow:Ia(1),doubleArrow:Ia(.5),folder:function(b){return[ga(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[ga(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[ga(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[ga(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[ga(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ca.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,
@@ -2894,7 +2895,7 @@ Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},"mxgraph.basic.rect":
H.prototype.size,H.prototype.fixedSize),parallelogram:Va(1,C.prototype.size,C.prototype.fixedSize)};Graph.createHandle=ga;Graph.handleFactory=Qa;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=Qa[d];null==d&&null!=this.state.shape&&this.state.shape.isRoundable()&&(d=Qa[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=Qa[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory=
{};var Ra=new mxPoint(1,0),Sa=new mxPoint(1,0),Ia=mxUtils.toRadians(-30),Ra=mxUtils.getRotatedPoint(Ra,Math.cos(Ia),Math.sin(Ia)),Ia=mxUtils.toRadians(-150),Sa=mxUtils.getRotatedPoint(Sa,Math.cos(Ia),Math.sin(Ia));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=Ra.x,n=Ra.y,q=Sa.x,F=Sa.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=(F*b-q*c)/(k*F-n*q);b=(n*b-k*c)/(n*q-k*F);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+F*b)):(f&&(p=new mxPoint(p.x+q*b,p.y+F*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",
+f.getCenterY()));var k=Ra.x,p=Ra.y,q=Sa.x,F=Sa.y,u="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=l&&null!=m){b=function(b,d,f){b-=n.x;var c=d-n.y;d=(F*b-q*c)/(k*F-p*q);b=(p*b-k*c)/(p*q-k*F);u?(f&&(n=new mxPoint(n.x+k*d,n.y+p*d),e.push(n)),n=new mxPoint(n.x+q*b,n.y+F*b)):(f&&(n=new mxPoint(n.x+q*b,n.y+F*b),e.push(n)),n=new mxPoint(n.x+k*d,n.y+p*d));e.push(n)};var n=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,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
@@ -2910,7 +2911,7 @@ null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.
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,.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};n.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
+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=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,0),!1,null,0,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2923,7 +2924,7 @@ d),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(
.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)];X.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,.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)];q.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,
+.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,.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)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.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)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
@@ -2946,14 +2947,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;la.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)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();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,p=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,n=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(q){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+q.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(),
+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(),
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(q){}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(p){}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)||
@@ -2966,13 +2967,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=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,
+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,
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=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 k=b.getElementsByTagName("a"),
-n=0;n<k.length&&null==d;n++)k[n].textContent==b.textContent&&(d=k[n]);null!=d&&"A"==d.nodeName&&(c=d.getAttribute("href")||"",g.selectNode(d));var u=g.cellEditor.saveSelection();e.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(b){g.cellEditor.restoreSelection(u);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();
+!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 u=g.cellEditor.saveSelection();e.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(b){g.cellEditor.restoreSelection(u);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 n=g.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(n=n.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var u=document.createElement("div");u.innerHTML=g.sanitizeHtml(n);n=mxUtils.extractTextWithWhitespace(u.childNodes);g.cellLabelChanged(state.cell,n);g.setCellStyles("html",b,[d[c]])}else"0"==k&&"1"==b&&(n=mxUtils.htmlEntities(g.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
-"1")&&(n=n.replace(/\n/g,"<br/>")),g.cellLabelChanged(state.cell,g.sanitizeHtml(n)),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",
+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 u=document.createElement("div");u.innerHTML=g.sanitizeHtml(q);q=mxUtils.extractTextWithWhitespace(u.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",
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=mxRectangle.fromRectangle(b),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-
@@ -2982,9 +2983,9 @@ d,(g.container.clientHeight-10)/b.height/d))/20);mxUtils.hasScrollbars(g.contain
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());g.defaultGridEnabled=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=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,
+t.isEnabled=n;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=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+
+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,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...",
@@ -2996,41 +2997,41 @@ this.addAction("rounded",function(){g.getModel().beginUpdate();try{g.setCellStyl
c="1"==mxUtils.getValue(d,mxConstants.STYLE_ROUNDED,"0")?"0":"1";g.setCellStyles(mxConstants.STYLE_ROUNDED,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,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=
+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,[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),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 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",
+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")),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 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}
+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]};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(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={},m=this.ui.getHashValueForPages(this.shadowPages,p);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",m==l,l);if(null!=l&&l!=m){var q=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: "+m+"\nCurrent Details: "+JSON.stringify(p)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+q+"\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(C){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(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)),u=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,d,"Shadow Details: "+JSON.stringify(k)+
+"\nChecksum: "+l+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(n)+"\nFrom: "+u+"\nTo: "+v+"\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(C){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
null!=e&&e(C);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,C);else{var y=this.getCurrentUser(),x=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,C)}}catch(H){}}};
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 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"));
+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"));
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),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(),m=l.lastIndexOf("."),t="xml";0<m&&(t=l.substring(m));var q=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),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()+
":\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"+q+"\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&&
+"")+(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&&
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(),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,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 q=
-0;q<b.length;q++)this.ui.pages=this.ui.patchPages(this.ui.pages,b[q],!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=p,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(),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!=
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,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.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.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""};
@@ -3060,27 +3061,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))}),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,
+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,
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 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])};
+!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])};
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,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};
+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};
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 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.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.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"},
@@ -3144,8 +3145,8 @@ arguments):(this.begin(),this.moveTo(b+e,d),this.lineTo(b+c-e,d),this.quadTo(b+c
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","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 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=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=
+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=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,
@@ -3184,8 +3185,8 @@ c&&d(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(
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(Y){}})(k[m])});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 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(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:n})},k)});n()}catch(na){null!=c&&c(na)}};Editor.prototype.absoluteCssFonts=
+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(na){null!=c&&c(na)}};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";
@@ -3193,18 +3194,18 @@ else if("eot"==k||/(\.eot)($|\?)/i.test(b))d="application/vnd.ms-fontobject";els
function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(d){this.resolvedFontCss=d;null!=b&&b()})):null!=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,n,q,p,u,x,v,t,y,D){try{g=null!=g?g:!0;l=null!=l?l:!0;p=null!=p?p:this.graph;u=null!=u?u:0;var F=m?null:p.background;F==mxConstants.NONE&&(F=null);null==F&&(F=f);null==F&&0==m&&(F=t?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(p.getSvg(null,null,u,x,null,l,null,null,null,n,null,t,y,D),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(){x.drawImage(f,0,0);b(m,c)},0):(x.drawImage(f,0,0),b(m,c))},m=document.createElement("canvas"),n=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/n)):d/n);k=this.getMaxCanvasScale(n,q,k);n=
-Math.ceil(k*n);q=Math.ceil(k*q);m.setAttribute("width",n);m.setAttribute("height",q);var x=m.getContext("2d");null!=F&&(x.beginPath(),x.rect(0,0,n,q),x.fillStyle=F,x.fill());1!=k&&x.scale(k,k);if(v){var t=p.view,y=t.scale;t.scale=1;var A=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=y;var A="data:image/svg+xml;base64,"+A,D=p.gridSize*t.gridSteps*k,B=p.getGraphBounds(),J=t.translate.x*y,N=t.translate.y*y,I=J+(B.x-J)/y-u,E=N+(B.y-N)/y-u,C=new Image;C.onload=function(){try{for(var b=
--Math.round(D-mxUtils.mod((J-I)*k,D)),d=-Math.round(D-mxUtils.mod((N-E)*k,D));b<n;b+=D)for(var c=d;c<q;c+=D)x.drawImage(C,b/k,c/k);l()}catch(V){null!=e&&e(V)}};C.onerror=function(b){null!=e&&e(b)};C.src=A}else l()}catch(Ba){null!=e&&e(Ba)}});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(ea){null!=
-e&&e(ea)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(ha){null!=e&&e(ha)}}))}catch(ea){null!=e&&e(ea)}}),c,q)}catch(ma){null!=e&&e(ma)}};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>>>
+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,x,v,t,y,D){try{g=null!=g?g:!0;l=null!=l?l:!0;n=null!=n?n:this.graph;u=null!=u?u:0;var F=m?null:n.background;F==mxConstants.NONE&&(F=null);null==F&&(F=f);null==F&&0==m&&(F=t?this.graph.defaultPageBackgroundColor:"#ffffff");
+this.convertImages(n.getSvg(null,null,u,x,null,l,null,null,null,p,null,t,y,D),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(){x.drawImage(f,0,0);b(m,c)},0):(x.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 x=m.getContext("2d");null!=F&&(x.beginPath(),x.rect(0,0,p,q),x.fillStyle=F,x.fill());1!=k&&x.scale(k,k);if(v){var t=n.view,y=t.scale;t.scale=1;var A=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=y;var A="data:image/svg+xml;base64,"+A,D=n.gridSize*t.gridSteps*k,B=n.getGraphBounds(),J=t.translate.x*y,N=t.translate.y*y,I=J+(B.x-J)/y-u,E=N+(B.y-N)/y-u,C=new Image;C.onload=function(){try{for(var b=
+-Math.round(D-mxUtils.mod((J-I)*k,D)),d=-Math.round(D-mxUtils.mod((N-E)*k,D));b<p;b+=D)for(var c=d;c<q;c+=D)x.drawImage(C,b/k,c/k);l()}catch(V){null!=e&&e(V)}};C.onerror=function(b){null!=e&&e(b)};C.src=A}else l()}catch(Ba){null!=e&&e(Ba)}});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(ea){null!=
+e&&e(ea)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(ha){null!=e&&e(ha)}}))}catch(ea){null!=e&&e(ea)}}),c,q)}catch(ma){null!=e&&e(ma)}};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 n=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+n);g(b,n);g(b,4)}while(n);return"data:image/png;base64,"+
+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,"+
(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 q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=q.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)}});
+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)}});
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",
@@ -3232,34 +3233,34 @@ gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill
f(e.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{f(JSON.parse(b))}catch(W){}}};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 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=[],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&&(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 m=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(m);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=
+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){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 p={type:c,parentRow:l,index:q,isDeletable:!0,defVal:e,countProperty:g},q=n(b,"",p,0==q%2,k);f(b,e,p);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 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(m(d,c,n));else if("enum"==x){var D=n.enumList;for(u=0;u<D.length;u++)if(v=D[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<D.length;l++){var k=D[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,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(k(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=
+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 D=p.enumList;for(u=0;u<D.length;u++)if(v=D[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<D.length;l++){var k=D[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=
"relative";b.style.padding="0";var x=document.createElement("table");x.className="geProperties";x.style.whiteSpace="nowrap";x.style.width="100%";var v=document.createElement("tr");v.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"));v.style.cursor="pointer";var D=function(){var d=x.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(qa){}}else y.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<d.length;f++)d[f].style.display=c};mxEvent.addListener(v,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;D()});v.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";
-t.innerHTML=mxResources.get("value");v.appendChild(t);x.appendChild(v);var F=!1,B=!1,v=null;1==c.vertices.length&&0==c.edges.length?v=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(v=c.edges[0].id);null!=v&&x.appendChild(n("id",mxUtils.htmlEntities(v),{dispName:"ID",type:"readOnly"},!0,!1));for(var A in d)if(v=d[A],"function"!=typeof v.isVisible||v.isVisible(c,this)){var N=null!=c.style[A]?mxUtils.htmlEntities(c.style[A]+""):null!=v.getDefaultValue?v.getDefaultValue(c,this):v.defVal;if("separator"==
-v.type)B=!B;else{if("staticArr"==v.type)v.size=parseInt(c.style[v.sizeProperty]||d[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var J=v.dependentProps,E=[],C=[],t=0;t<J.length;t++){var O=c.style[J[t]];C.push(d[J[t]].subDefVal);E.push(null!=O?O.split(","):[])}v.dependentPropsDefVal=C;v.dependentPropsVals=E}x.appendChild(n(A,N,v,F,B));F=!F}}for(t=0;t<u.length;t++)for(v=u[t],d=v.parentRow,c=0;c<v.values.length;c++)A=n(v.name,v.values[c],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,
+t.innerHTML=mxResources.get("value");v.appendChild(t);x.appendChild(v);var F=!1,B=!1,v=null;1==c.vertices.length&&0==c.edges.length?v=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(v=c.edges[0].id);null!=v&&x.appendChild(p("id",mxUtils.htmlEntities(v),{dispName:"ID",type:"readOnly"},!0,!1));for(var A in d)if(v=d[A],"function"!=typeof v.isVisible||v.isVisible(c,this)){var N=null!=c.style[A]?mxUtils.htmlEntities(c.style[A]+""):null!=v.getDefaultValue?v.getDefaultValue(c,this):v.defVal;if("separator"==
+v.type)B=!B;else{if("staticArr"==v.type)v.size=parseInt(c.style[v.sizeProperty]||d[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var J=v.dependentProps,E=[],C=[],t=0;t<J.length;t++){var O=c.style[J[t]];C.push(d[J[t]].subDefVal);E.push(null!=O?O.split(","):[])}v.dependentPropsDefVal=C;v.dependentPropsVals=E}x.appendChild(p(A,N,v,F,B));F=!F}}for(t=0;t<u.length;t++)for(v=u[t],d=v.parentRow,c=0;c<v.values.length;c++)A=p(v.name,v.values[c],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,
index:c,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==c%2,v.flipBkg),d.parentNode.insertBefore(A,d.nextSibling),d=A;b.appendChild(x);D();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 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)}))})(m);k.push(n);l.appendChild(n)}var q=mxUtils.bind(this,function(b){null!=k[b]&&(null!=this.format.currentScheme&&null!=k[this.format.currentScheme]&&(k[this.format.currentScheme].style.background=
-"transparent"),this.format.currentScheme=b,p(this.defaultColorSchemes[this.format.currentScheme]),k[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 k=f.getModel().getStyle(e[l]),m=0;m<g.length;m++)k=mxUtils.removeStylename(k,g[m]);var n=f.getModel().isVertex(e[l])?
-c.initialDefaultVertexStyle:c.initialdefaultEdgeStyle;null!=b?(mxEvent.isShiftDown(d)||(k=""==b.fill?mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,null)),k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,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(n,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(d)||(k=""==b.stroke?mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,b.stroke||mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,null)))):(k=mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,"#ffffff")),k=mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,
-"#000000")),k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(e[l])&&(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(n,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?
+"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!=k[b]&&(null!=this.format.currentScheme&&null!=k[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?(mxEvent.isShiftDown(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)),k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,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)))),mxEvent.isAltDown(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)))):(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";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()?
Editor.darkColor:"#ffffff"):b.fill||mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");d.style.border=b.stroke==mxConstants.NONE?l+" transparent":""==b.stroke?l+" "+mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):l+" "+(b.stroke||mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));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);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,
+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,
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"),
@@ -3270,38 +3271,38 @@ b[d].getAttribute("face"):b[d].style.fontFamily;null!=f&&Graph.addFont(f,c)}}};G
null;mxEvent.addListener(this.container,"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 C=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,f,e,g,l,k,m,n,
-q){C.apply(this,arguments);Graph.processFontAttributes(q)};var H=mxText.prototype.redraw;mxText.prototype.redraw=function(){H.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){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 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),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");
+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 C=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,f,e,g,l,k,m,p,
+q){C.apply(this,arguments);Graph.processFontAttributes(q)};var H=mxText.prototype.redraw;mxText.prototype.redraw=function(){H.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)});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(k,b);0<=c&&k.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)}m.appendChild(n)})(b[q]);g.appendChild(m);n.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 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";m.appendChild(n);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 p=mxUtils.button(mxResources.get("add"),function(){null!=c&&c(k,function(b){k=b;u()})});p.setAttribute("title",mxResources.get("add"));p.className="geBtn";p.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(p),m.appendChild(v));return{div:m,refresh:u}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,
+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=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 D=Graph.prototype.isFastZoomEnabled;
Graph.prototype.isFastZoomEnabled=function(){return D.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(A){null!=window.console&&console.log("Error in vars URL parameter: "+A)}};Graph.prototype.getExportVariables=
function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var E=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var d=E.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 M=Graph.prototype.getSvg;Graph.prototype.getSvg=function(b,d,c,f,e,g,l,k,m,n,q,p,u,v){var x=null,t=null,y=null;p||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultForegroundColor,y=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.defaultForegroundColor="darkTheme"==this.defaultThemeName?"#000000":"#f0f0f0",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var D=M.apply(this,
+var M=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,y=null;n||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultForegroundColor,y=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.defaultForegroundColor="darkTheme"==this.defaultThemeName?"#000000":"#f0f0f0",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var D=M.apply(this,
arguments),B=this.getCustomFonts();if(q&&0<B.length){var F=D.ownerDocument,N=null!=F.createElementNS?F.createElementNS(mxConstants.NS_SVG,"style"):F.createElement("style");null!=F.setAttributeNS?N.setAttributeNS("type","text/css"):N.setAttribute("type","text/css");for(var A="",E="",C=0;C<B.length;C++){var J=B[C].name,O=B[C].url;Graph.isCssFontUrl(O)?A+="@import url("+O+");\n":E+='@font-face {\nfont-family: "'+J+'";\nsrc: url("'+O+'");\n}\n'}N.appendChild(F.createTextNode(A+E));D.getElementsByTagName("defs")[0].appendChild(N)}null!=
x&&(this.defaultPageBackgroundColor=y,this.defaultForegroundColor=t,this.stylesheet=x,this.refresh());return D};var G=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var b=G.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 B=Graph.prototype.refresh;Graph.prototype.refresh=function(){B.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var L=Graph.prototype.loadStylesheet;
Graph.prototype.loadStylesheet=function(){L.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,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;k()}),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,k,c?0:
-n.fadeIn.delay));null!=n.fadeOut&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeOut,!0)),1,0,k,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,k,c?1:n.steps,c?0:n.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=
+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<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(aa){}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 O=Graph.prototype.isCellVisible;
Graph.prototype.isCellVisible=function(b){return O.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]),n=!1;if(0<m.length&&(m=m.split(" "),m.length>=b.length)){for(var q=n=0;q<m.length&&n<g;q++)null!=l[m[q]]&&n++;n=n==g}n&&(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()))};
+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]),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,
@@ -3323,42 +3324,42 @@ STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PAT
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 da=mxMarker.createMarker;mxMarker.createMarker=
-function(b,d,c,f,e,g,l,k,m,n){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&mxStencilRegistry.getStencil(q)}return da.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,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=J.get(),t=1/d.pageScale,B=D.checked;if(B)var t=parseInt(Q.value),N=parseInt(M.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;!B&&d.pageVisible?(p=d.getPageLayout(),u-=p.x*x.width,v-=p.y*x.height):B=!0;if(null==c){c=PrintDialog.createPrintPreview(d,t,x,0,u,v,B);c.pageSelector=!1;c.mathEnabled=!1;u=b.getCurrentFile();null!=u&&(c.title=u.getTitle());var E=c.writeHead;c.writeHead=function(c){E.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">'),
+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 da.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=J.get(),t=1/d.pageScale,B=D.checked;if(B)var t=parseInt(Q.value),N=parseInt(M.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;!B&&d.pageVisible?(n=d.getPageLayout(),u-=n.x*x.width,v-=n.y*x.height):B=!0;if(null==c){c=PrintDialog.createPrintPreview(d,t,x,0,u,v,B);c.pageSelector=!1;c.mathEnabled=!1;u=b.getCurrentFile();null!=u&&(c.title=u.getTitle());var E=c.writeHead;c.writeHead=function(c){E.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 C=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=C.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(),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=B;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,B=g[u].url,Graph.isCssFontUrl(B)?c.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(B)+
-'" 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(B)+'");\n}'),c.wnd.document.writeln("</style>"))}l&&(d.useCssTransforms=l,d.currentTranslate=k,d.currentScale=m,d.view.translate=n,d.view.scale=q);return c}var f=parseInt(G.value)/100;isNaN(f)&&(f=1,G.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,n=!q.checked,p=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,l,k,D.checked,Q.value,M.value,parseInt(y.value)/100,parseInt(G.value)/100,J.get());else{n&&(n=l==m&&k==m);if(!n&&null!=b.pages&&b.pages.length){var x=0,n=b.pages.length-1;q.checked||(x=parseInt(l)-1,n=parseInt(k)-1);for(var t=x;t<=n;t++){var B=b.pages[t],l=B==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),k=!0,x=
+'" 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(B)+'");\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(G.value)/100;isNaN(f)&&(f=1,G.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,D.checked,Q.value,M.value,parseInt(y.value)/100,parseInt(G.value)/100,J.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 B=b.pages[t],l=B==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),k=!0,x=
!1,N=null,E=null;null==B.viewState&&null==B.root&&b.updatePageRoot(B);null!=B.viewState&&(k=B.viewState.pageVisible,x=B.viewState.mathEnabled,N=B.viewState.background,E=B.viewState.backgroundImage,l.extFonts=B.viewState.extFonts);l.background=N;l.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;l.pageVisible=k;l.mathEnabled=x;var C=l.getGlobalVariable;l.getGlobalVariable=function(d){return"page"==d?B.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=b.pages?b.pages.length:1:C.apply(this,
-arguments)};document.body.appendChild(l.container);b.updatePageRoot(B);l.model.setRoot(B.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 k=1,m=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&&(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(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),D=t.cloneNode(!0);D.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(D);n.appendChild(l);x=document.createElement("table");x.style.display="inline-block";
+arguments)};document.body.appendChild(l.container);b.updatePageRoot(B);l.model.setRoot(B.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),D=t.cloneNode(!0);D.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(D);p.appendChild(l);x=document.createElement("table");x.style.display="inline-block";
var B=document.createElement("tbody"),N=document.createElement("tr"),E=N.cloneNode(!0),C=document.createElement("td"),O=C.cloneNode(!0),F=C.cloneNode(!0),H=C.cloneNode(!0),L=C.cloneNode(!0),K=C.cloneNode(!0);C.style.textAlign="right";H.style.textAlign="right";mxUtils.write(C,mxResources.get("fitTo"));var Q=document.createElement("input");Q.style.cssText="margin:0 8px 0 8px;";Q.setAttribute("value","1");Q.setAttribute("min","1");Q.setAttribute("type","number");Q.style.width="40px";O.appendChild(Q);
l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));F.appendChild(l);mxUtils.write(H,mxResources.get("fitToBy"));var M=Q.cloneNode(!0);L.appendChild(M);mxEvent.addListener(Q,"focus",function(){D.checked=!0});mxEvent.addListener(M,"focus",function(){D.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));K.appendChild(l);N.appendChild(C);N.appendChild(O);N.appendChild(F);E.appendChild(H);E.appendChild(L);E.appendChild(K);
-B.appendChild(N);B.appendChild(E);x.appendChild(B);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 J=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 G=document.createElement("input");G.style.cssText="margin:0 8px 0 8px;";G.setAttribute("value","100 %");G.style.width="60px";n.appendChild(G);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==
+B.appendChild(N);B.appendChild(E);x.appendChild(B);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 J=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 G=document.createElement("input");G.style.cssText="margin:0 8px 0 8px;";G.setAttribute("value","100 %");G.style.width="60px";p.appendChild(G);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!=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 Q=document.createElement("canvas"),X=new Image;X.onload=function(){try{Q.getContext("2d").drawImage(X,
0,0);var b=Q.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=b&&6<b.length}catch(J){}};X.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(F){}})();
(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.5.8";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.5.9";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,n,p){n=null!=n?n: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="+n+"&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{p||null==window.console||console.error(n,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,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)):
"")}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;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;(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"),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(q){}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(q){}})();EditorUi.prototype.openLink=
+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;(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);c()};EditorUi.prototype.setMathEnabled=function(b){this.editor.graph.mathEnabled=b;this.editor.updateGraphComponents();this.editor.graph.refresh();this.editor.graph.defaultMathEnabled=
b;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=
@@ -3368,200 +3369,200 @@ k.innerHTML=l,e.appendChild(k),f.status=k),this.pause=mxUtils.bind(this,function
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),n=this.editor.extractGraphModel(k.documentElement,null!=this.pages||"hidden"==
-this.diagramContainer.style.visibility),d=null!=n?mxUtils.getXml(n):""}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;
+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(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,n,p,v,t,x,C){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(C){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");
+EditorUi.prototype.createFileData=function(b,c,e,g,k,q,n,v,t,x,C){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(C){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"),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));
-C=C?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!n&&!k&&(p||null!=e&&/(\.html)$/i.test(e.getTitle())))C=this.getHtml2(mxUtils.getXml(l),c,null!=e?e.getTitle():null,d,f);else if(n||!k&&null!=e&&/(\.svg)$/i.test(e.getTitle()))null==e||e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER||(g=null),C=this.getEmbeddedSvg(C,c,g,null,v,t,f);return C};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);
+C=C?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!q&&!k&&(n||null!=e&&/(\.html)$/i.test(e.getTitle())))C=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),C=this.getEmbeddedSvg(C,c,g,null,v,t,f);return C};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(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&&
+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="["+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,n,p,v,t,x,C){k=null!=k?k:!0;n=null!=n?n:!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)}}p=null!=p?p:this.getXmlFileData(k,
-n,x,C);t=null!=t?t:this.getCurrentFile();b=this.createFileData(p,d,t,window.location.href,b,c,e,g,k,v,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return b};EditorUi.prototype.getHtml=function(b,c,e,g,k,n){n=null!=n?n:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var d=n?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),l=c.view.scale;n=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",n);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==
+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,v,t,x,C){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,C);t=null!=t?t:this.getCurrentFile();b=this.createFileData(n,d,t,window.location.href,b,c,e,g,k,v,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));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(),p=k.getChildren(k.root),e=0;e<p.length;e++){var v=p[e];k.setVisible(v,b[v.id]||
+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 v=n[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,C,H){try{g=null!=g?g:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!k),f=d+("xml"==b||"pdf"==b&&C?".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!=n&&(this.editor.graph.pageVisible=n);var e=this.createDownloadRequest(d,b,g,c,p,k,v,t,x,C,H);this.editor.graph.pageVisible=f;return e}catch(X){this.handleError(X)}}));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(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,g,k,n,p,v,t,x,C){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!=C?m="&from="+C.from+"&to="+C.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!=
+this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(b,c,e,g,k,q,n,v,t,x,C,H){try{g=null!=g?g:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!k),f=d+("xml"==b||"pdf"==b&&C?".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,v,t,x,C,H);this.editor.graph.pageVisible=f;return e}catch(X){this.handleError(X)}}));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 u=this.editor.graph.background;if(n||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();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(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,g,k,q,n,v,t,x,C){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!=C?m="&from="+C.from+"&to="+C.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!=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 p=null;try{for(b=b.firstChild;null!=b;){if("update"==
+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 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 C=x.attributes,H=0;H<C.length;H++)g.setAttributeForCell(v,C[H].nodeName,0<C[H].nodeValue.length?C[H].nodeValue:null)}}catch(O){null!=window.console&&console.log("Error in value for "+v.id+": "+O)}try{var D=b.getAttribute("style");null!=D&&g.model.setStyle(v,D)}catch(O){null!=
window.console&&console.log("Error in style for "+v.id+": "+O)}try{var E=b.getAttribute("icon");if(null!=E){var M=0<E.length?JSON.parse(E):null;null!=M&&M.append||g.removeCellOverlays(v);null!=M&&g.addCellOverlay(v,d(M))}}catch(O){null!=window.console&&console.log("Error in icon for "+v.id+": "+O)}try{var G=b.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),K=g.getCellGeometry(v);if(null!=K){K=K.clone();for(key in G){var B=parseFloat(G[key]);"dx"==key?K.x+=B:"dy"==key?K.y+=B:"dw"==key?K.width+=
B:"dh"==key?K.height+=B:K[key]=parseFloat(G[key])}g.model.setGeometry(v,K)}}}catch(O){null!=window.console&&console.log("Error in icon for "+v.id+": "+O)}}}else if("model"==b.nodeName){for(var L=b.firstChild;null!=L&&L.nodeType!=mxConstants.NODETYPE_ELEMENT;)L=L.nextSibling;null!=L&&(new mxCodec(b.firstChild)).decode(L,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);
+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};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(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"!=
+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"!=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,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(),
+function(b,c,e,g,k,q,n){};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 f=JSON.parse(mxUtils.getTextContent(d.documentElement));
this.libraryLoaded(b,f,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 p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding="8px";p.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 H=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!=H?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));
-if(b.isEditable()){var D=this.editor.graph,E=null,M=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),G=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=E&&null!=E.parentNode&&E.parentNode.removeChild(E),E=t.cloneNode(!1),E.setAttribute("src",Editor.spinImage),E.setAttribute("title",mxResources.get("saving")),E.style.cursor="default",E.style.marginRight="2px",E.style.marginTop="-2px",p.insertBefore(E,p.firstChild),m.style.paddingRight=
-18*p.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=E&&null!=E.parentNode&&(E.parentNode.removeChild(E),m.style.paddingRight=18*p.childNodes.length+"px")})):null==H&&(H=t.cloneNode(!1),H.setAttribute("src",Editor.saveImage),H.setAttribute("title",mxResources.get("save")),p.insertBefore(H,p.firstChild),mxEvent.addListener(H,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
-H||b.isModified()||(m.style.paddingRight=18*p.childNodes.length+"px",H.parentNode.removeChild(H),H=null)});mxEvent.consume(d)})),m.style.paddingRight=18*p.childNodes.length+"px")}),K=mxUtils.bind(this,function(b,d,e,g){b=D.cloneCells(mxUtils.sortCells(D.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=D.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))),
+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 H=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!=H?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));
+if(b.isEditable()){var D=this.editor.graph,E=null,M=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),G=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=E&&null!=E.parentNode&&E.parentNode.removeChild(E),E=t.cloneNode(!1),E.setAttribute("src",Editor.spinImage),E.setAttribute("title",mxResources.get("saving")),E.style.cursor="default",E.style.marginRight="2px",E.style.marginTop="-2px",n.insertBefore(E,n.firstChild),m.style.paddingRight=
+18*n.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=E&&null!=E.parentNode&&(E.parentNode.removeChild(E),m.style.paddingRight=18*n.childNodes.length+"px")})):null==H&&(H=t.cloneNode(!1),H.setAttribute("src",Editor.saveImage),H.setAttribute("title",mxResources.get("save")),n.insertBefore(H,n.firstChild),mxEvent.addListener(H,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
+H||b.isModified()||(m.style.paddingRight=18*n.childNodes.length+"px",H.parentNode.removeChild(H),H=null)});mxEvent.consume(d)})),m.style.paddingRight=18*n.childNodes.length+"px")}),K=mxUtils.bind(this,function(b,d,e,g){b=D.cloneCells(mxUtils.sortCells(D.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=D.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);G(e);null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)}),B=mxUtils.bind(this,function(b){if(D.isSelectionEmpty())D.getRubberband().isActive()?(D.getRubberband().execute(b),D.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=D.getSelectionCells(),c=D.view.getBounds(d),f=D.view.scale;c.x/=f;c.y/=f;c.width/=f;c.height/=f;c.x-=D.view.translate.x;
c.y-=D.view.translate.y;K(d,c)}mxEvent.consume(b)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(b){D.isMouseDown&&null!=D.panningManager&&null!=D.graphHandler.first&&(D.graphHandler.suspend(),null!=D.graphHandler.hint&&(D.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor="#f1f3f4",k.style.cursor="copy",D.panningManager.stop(),D.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){D.isMouseDown&&null!=D.panningManager&&null!=D.graphHandler&&
(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,D.panningManager.stop(),D.graphHandler.reset(),D.isMouseDown=!1,D.autoScroll=!0,B(b),mxEvent.consume(b))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(b){D.isMouseDown&&null!=D.graphHandler.first&&(D.graphHandler.resume(),null!=D.graphHandler.hint&&(D.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",D.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,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 x=!1,t=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);G(b);this.spinner.stop();x=!0}catch(Y){}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)}x=!0}catch(Y){null!=window.console&&console.log("error in drop handler:",Y)}x||(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){t(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?t(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):t(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",M);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==
-k&&M(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",B);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))}m.appendChild(p);m.style.paddingRight=18*p.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var d=0;d<b.length;d++){var f=b[d],e=f.data;if(null!=e){var e=this.convertDataUri(e),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+e,f.w,f.h,"",f.title||"",!1,!1,!0))}else null!=f.xml&&(e=this.stringToCells(Graph.decompress(f.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,p,q,n,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,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 x=!1,t=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);G(b);this.spinner.stop();x=!0}catch(Y){}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)}x=!0}catch(Y){null!=window.console&&console.log("error in drop handler:",Y)}x||(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!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?this.importVisio(v,function(b){t(b,"text/xml")},null,n):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,n)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?t(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):t(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",M);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==
+k&&M(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",B);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 f=b[d],e=f.data;if(null!=e){var e=this.convertDataUri(e),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+e,f.w,f.h,"",f.title||"",!1,!1,!0))}else null!=f.xml&&(e=this.stringToCells(Graph.decompress(f.xml)),
0<e.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(e,f.w,f.h,f.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=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
-Editor.darkColor,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",
-endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(b,c,e,g,k){b=new ImageDialog(this,b,c,e,g,k);this.showDialog(b.container,
-Graph.fileSupport?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,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(E){}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(){e.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;e.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";
+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=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultForegroundColor="#f0f0f0",Graph.prototype.defaultPageBorderColor=
+"#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,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",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(b,
+c,e,g,k){b=new ImageDialog(this,b,c,e,g,k);this.showDialog(b.container,Graph.fileSupport?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(E){}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(){e.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;e.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";
mxUtils.write(c,"<"+d[b].email+">");c.setAttribute("disabled","disabled");e.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=d.length;e.appendChild(c)}var d=this.drive.getUsersList(),c=document.createElement("div"),f=document.createElement("span");f.style.marginTop="6px";mxUtils.write(f,mxResources.get("changeUser")+": ");c.appendChild(f);var e=document.createElement("select");e.style.width="200px";b();mxEvent.addListener(e,"change",mxUtils.bind(this,
function(){var c=e.value,f=d.length!=c;f&&this.drive.setUser(d[c]);this.drive.authorize(f,mxUtils.bind(this,function(){f||(d=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));c.appendChild(e);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 p=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)):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,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),C=0;p<t;++C,++p)x[C]=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,v){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,450,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,v):null!=d&&0<d.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(b,
-d,e,g,c,f)}catch(M){this.handleError(M)}}))}catch(E){this.handleError(E)}}),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,420,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=
-"#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var c=d.getBoundingClientRect();
-this.tagsDialog.style.left=c.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=c.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(b)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(){var b=this.editor.graph.getAllTags();d.style.display=0<b.length?"":"none"}));k.apply(this,arguments)}this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",
-mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var c=b(mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",d);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)d.apply(this);else{this.exportDialog=document.createElement("div");var e=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,
-"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=e.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.zIndex;var 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,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(E){this.handleError(E)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),b,n,!0,d,e)}catch(E){this.handleError(E)}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,420,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,C,H,D,E){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=C?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,C,H);g&&this.editor.graph.addSvgShadow(l);var m=this.getBaseFilename()+(k?".drawio":"")+".svg";E=null!=E?E:mxUtils.bind(this,function(b){this.isLocalFileSave()||
-b.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});var 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));E(Graph.xmlDeclaration+"\n"+(k?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b))});this.editor.graph.mathEnabled&&this.editor.addMathCss(l);
-var u=mxUtils.bind(this,function(b){n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(b,q,this.thumbImageCache)):q(b)});D?this.embedFonts(l,u):(this.editor.addFontCss(l),u(l))}catch(da){this.handleError(da)}};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,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,C,H){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!=C&&0<C.length&&(d.edit=C);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):"";H(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.DRAWIO_VIEWER_URL?window.DRAWIO_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 p=this.getCurrentFile();null==e&&null!=p&&p.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(p.getId())})));f.setAttribute("checked","checked");null==e&&k.setAttribute("disabled","disabled");d.appendChild(l);var t=this.addLinkSection(d),H=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.style.marginRight="12px";D.value=
-"100%";d.appendChild(D);var E=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,M=M=this.addCheckbox(d,mxResources.get("allPages"),l,!l),G=this.addCheckbox(d,mxResources.get("layers"),!0),K=this.addCheckbox(d,mxResources.get("tags"),!0),B=this.addCheckbox(d,mxResources.get("lightbox"),!0),L=this.addEditButton(d,B),O=L.getEditInput();O.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?O.removeAttribute("disabled"):O.setAttribute("disabled",
-"disabled");O.checked&&B.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){g(k.checked?e:null,H.checked,D.value,t.getTarget(),t.getColor(),E.checked,M.checked,G.checked,K.checked,B.checked,L.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 E=this.addLinkSection(d,n);e=null!=this.pages&&1<this.pages.length;var M=null;
-if(null==l||l.constructor!=window.DriveFile||c)M=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var G=this.addCheckbox(d,mxResources.get("lightbox"),!0,null,null,!n),K=this.addEditButton(d,G),B=K.getEditInput();n&&(B.style.marginLeft=G.style.marginLeft,G.style.display="none",b-=20);var L=this.addCheckbox(d,mxResources.get("layers"),!0);L.style.marginLeft=B.style.marginLeft;L.style.marginTop="8px";var O=this.addCheckbox(d,mxResources.get("tags"),!0);O.style.marginLeft=B.style.marginLeft;O.style.marginBottom=
-"16px";O.style.marginTop="16px";mxEvent.addListener(G,"change",function(){G.checked?(L.removeAttribute("disabled"),B.removeAttribute("disabled")):(L.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&G.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){k(E.getTarget(),E.getColor(),null==M?!0:M.checked,G.checked,K.getLink(),L.checked,null!=p?p.value:null,
-null!=t?t.value:null,O.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)):E.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:"+
+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 u=q=null;null!=f&&null!=f.helpLink?(q=mxResources.get("help"),u=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(f.helpLink)})):null!=f&&null!=f.ownerEmail&&(q=mxResources.get("contactOwner"),n+=mxUtils.htmlEntities(" ("+q+": "+f.ownerEmail+")"),u=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(f.ownerEmail))}));this.showError(c,n,l,e,m,null,null,q,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,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,"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))),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),C=0;n<t;++C,++n)x[C]=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,v){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,450,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,v):null!=d&&0<d.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(b,d,e,g,c,f)}catch(M){this.handleError(M)}}))}catch(E){this.handleError(E)}}),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,420,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>"+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="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&
+(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var c=d.getBoundingClientRect();this.tagsDialog.style.left=c.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=c.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(b)}),
+Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.editor.graph.getAllTags();d.style.display=0<b.length?"":"none"}));k.apply(this,arguments)}this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&
+(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),
+this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var c=b(mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",d);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)d.apply(this);
+else{this.exportDialog=document.createElement("div");var e=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color=
+"#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=e.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.zIndex;var 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(E){this.handleError(E)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),b,q,!0,d,e)}catch(E){this.handleError(E)}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,420,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,t,y,x,C,H,D,E){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=C?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(f,b,n,t,null,e,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,C,H);g&&this.editor.graph.addSvgShadow(l);var m=
+this.getBaseFilename()+(k?".drawio":"")+".svg";E=null!=E?E:mxUtils.bind(this,function(b){this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});var p=mxUtils.bind(this,function(b){this.spinner.stop();k&&b.setAttribute("content",this.getFileData(!0,null,null,null,e,y,null,null,null,!1));E(Graph.xmlDeclaration+"\n"+(k?Graph.svgFileComment+
+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b))});this.editor.graph.mathEnabled&&this.editor.addMathCss(l);var u=mxUtils.bind(this,function(b){q?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(b,p,this.thumbImageCache)):p(b)});D?this.embedFonts(l,u):(this.editor.addFontCss(l),u(l))}catch(da){this.handleError(da)}};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,t){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!=t&&d.setAttribute("name",t);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");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,t,y,x){y=this.createUrlParameters(b,
+c,e,g,k,q,y);b=this.getCurrentFile();c=!0;null!=n?e="#U"+encodeURIComponent(n):(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,q,n,t,y,x,C,H){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!=C&&0<C.length&&(d.edit=C);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):"";H(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.DRAWIO_VIEWER_URL?window.DRAWIO_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),H=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft=
+"4px";D.style.marginRight="12px";D.value="100%";d.appendChild(D);var E=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,M=M=this.addCheckbox(d,mxResources.get("allPages"),l,!l),G=this.addCheckbox(d,mxResources.get("layers"),!0),K=this.addCheckbox(d,mxResources.get("tags"),!0),B=this.addCheckbox(d,mxResources.get("lightbox"),!0),L=this.addEditButton(d,B),O=L.getEditInput();O.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?O.removeAttribute("disabled"):
+O.setAttribute("disabled","disabled");O.checked&&B.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){g(k.checked?e:null,H.checked,D.value,t.getTarget(),t.getColor(),E.checked,M.checked,G.checked,K.checked,B.checked,L.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 E=this.addLinkSection(d,q);e=null!=this.pages&&1<this.pages.length;var M=null;
+if(null==l||l.constructor!=window.DriveFile||c)M=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var G=this.addCheckbox(d,mxResources.get("lightbox"),!0,null,null,!q),K=this.addEditButton(d,G),B=K.getEditInput();q&&(B.style.marginLeft=G.style.marginLeft,G.style.display="none",b-=20);var L=this.addCheckbox(d,mxResources.get("layers"),!0);L.style.marginLeft=B.style.marginLeft;L.style.marginTop="8px";var O=this.addCheckbox(d,mxResources.get("tags"),!0);O.style.marginLeft=B.style.marginLeft;O.style.marginBottom=
+"16px";O.style.marginTop="16px";mxEvent.addListener(G,"change",function(){G.checked?(L.removeAttribute("disabled"),B.removeAttribute("disabled")):(L.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&G.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){k(E.getTarget(),E.getColor(),null==M?!0:M.checked,G.checked,K.getLink(),L.checked,null!=n?n.value:null,
+null!=t?t.value:null,O.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",!1,null)):E.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 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||
+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 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 B=document.createElement("select");B.style.marginTop="16px";B.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(m=0;m<b.length;m++)if(!f.isSelectionEmpty()||"selectionOnly"!=b[m]){var L=
-document.createElement("option");mxUtils.write(L,mxResources.get(b[m]));L.setAttribute("value",b[m]);B.appendChild(L)}y?(mxUtils.write(d,mxResources.get("size")+":"),d.appendChild(B),mxUtils.br(d),l+=26,mxEvent.addListener(B,"change",function(){"selectionOnly"==B.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()?
+document.createElement("option");mxUtils.write(L,mxResources.get(b[m]));L.setAttribute("value",b[m]);B.appendChild(L)}y?(mxUtils.write(d,mxResources.get("size")+":"),d.appendChild(B),mxUtils.br(d),l+=26,mxEvent.addListener(B,"change",function(){"selectionOnly"==B.value&&(u.checked=!0)})):q&&(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):(B.value="diagram",K.setAttribute("checked","checked"),K.defaultChecked=!0,mxEvent.addListener(u,"change",function(){B.value=u.checked?"selectionOnly":"diagram"}));var O=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),da=null;Editor.isDarkMode()&&(da=this.addCheckbox(d,mxResources.get("dark"),!0),l+=26);var N=this.addCheckbox(d,mxResources.get("shadow"),
f.shadowVisible),Q=document.createElement("input");Q.style.marginTop="16px";Q.style.marginRight="8px";Q.setAttribute("type","checkbox");var X=document.createElement("input");X.style.marginTop="16px";X.style.marginRight="8px";X.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||Q.setAttribute("disabled","disabled");c&&(d.appendChild(Q),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),d.appendChild(X),mxUtils.write(d,mxResources.get("embedFonts")),mxUtils.br(d),l+=
-60);var F=null;if("png"==t||"jpeg"==t)F=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),l+=30;var J=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),p,null,null,"jpeg"!=t);J.style.marginBottom="16px";var A=document.createElement("select");A.style.maxWidth="260px";A.style.marginLeft="8px";A.style.marginRight="10px";A.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));
+60);var F=null;if("png"==t||"jpeg"==t)F=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),l+=30;var J=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=t);J.style.marginBottom="16px";var A=document.createElement("select");A.style.maxWidth="260px";A.style.marginLeft="8px";A.style.marginRight="10px";A.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));
A.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("openInNewWindow"));A.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));A.appendChild(c);"svg"==t&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(A),mxUtils.br(d),mxUtils.br(d),l+=50);e=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=
-q.value;k(q.value,O.checked,!u.checked,N.checked,J.checked,Q.checked,v.value,K.checked,!1,A.value,null!=F?F.checked:null,null!=da?da.checked:null,B.value,X.checked)}),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),D=this.addEditButton(d,t),E=D.getEditInput(),M=1<f.model.getChildCount(f.model.getRoot()),G=this.addCheckbox(d,mxResources.get("layers"),M,
-!M);G.style.marginLeft=E.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(M&&G.removeAttribute("disabled"),E.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"));E.checked&&t.checked?D.getEditSelect().removeAttribute("disabled"):D.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){b(m.checked,q.checked,p.checked,t.checked,
-D.getLink(),G.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=
+p.value;k(p.value,O.checked,!u.checked,N.checked,J.checked,Q.checked,v.value,K.checked,!1,A.value,null!=F?F.checked:null,null!=da?da.checked:null,B.value,X.checked)}),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),D=this.addEditButton(d,t),E=D.getEditInput(),M=1<f.model.getChildCount(f.model.getRoot()),G=this.addCheckbox(d,mxResources.get("layers"),M,
+!M);G.style.marginLeft=E.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(M&&G.removeAttribute("disabled"),E.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"));E.checked&&t.checked?D.getEditSelect().removeAttribute("disabled"):D.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){b(m.checked,p.checked,n.checked,t.checked,
+D.getLink(),G.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=
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(n){}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(q){}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 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(D){null!=c&&c(D)}}),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(C){null!=c&&c(C)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,g,k,n,p,t,y,x,C,H,D){t=null!=t?t:!0;p=null!=y?y:c.background;p==mxConstants.NONE&&(p=null);n=c.getSvg(p,x,C,null,null,n,null,null,null,c.shadowVisible||H,null,D,"diagram");(c.shadowVisible||H)&&c.addSvgShadow(n);null!=b&&n.setAttribute("content",b);null!=e&&n.setAttribute("resource",e);var d=mxUtils.bind(this,function(b){b=(g?"":Graph.xmlDeclaration+
-"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(b);null!=k&&k(b);return b});c.mathEnabled&&this.editor.addMathCss(n);if(null!=k)this.embedFonts(n,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){d(b)})):d(b)}));else return d(n)};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,p,t,y,x,C,H,D){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,C)}catch(G){this.handleError(G)}}),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,H,D)}catch(M){this.spinner.stop(),this.handleError(M)}}};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 M=q[u].getAttribute("id");q[u].removeAttribute("id");var G=this.updatePageRoot(new DiagramPage(q[u]));b[M]=q[u].getAttribute("id");var K=this.pages.length;null==G.getName()&&G.setName(mxResources.get("pageWithNumber",
-[K+1]));f.model.execute(new ChangePage(this,G,G,K,!0));n.push(G)}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(B){if(k)throw B;this.handleError(B)}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=
+!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(D){null!=c&&c(D)}}),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(C){null!=c&&c(C)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,g,k,q,n,t,y,x,C,H,D){t=null!=t?t:!0;n=null!=y?y:c.background;n==mxConstants.NONE&&(n=null);q=c.getSvg(n,x,C,null,null,q,null,null,null,c.shadowVisible||H,null,D,"diagram");(c.shadowVisible||H)&&c.addSvgShadow(q);null!=b&&q.setAttribute("content",b);null!=e&&q.setAttribute("resource",e);var d=mxUtils.bind(this,function(b){b=(g?"":Graph.xmlDeclaration+
+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(b);null!=k&&k(b);return b});c.mathEnabled&&this.editor.addMathCss(q);if(null!=k)this.embedFonts(q,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){d(b)})):d(b)}));else return d(q)};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,q,n,t,y,x,C,H,D){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,C)}catch(G){this.handleError(G)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,e,b||1,c,g,null,null,q,n,x,H,D)}catch(M){this.spinner.stop(),this.handleError(M)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,e,g,k,q,n){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&&!q){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 t=p[0].getAttribute("name");null!=t&&
+""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<p.length){q=[];var u=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,u=1);for(;u<p.length;u++){var M=p[u].getAttribute("id");p[u].removeAttribute("id");var G=this.updatePageRoot(new DiagramPage(p[u]));b[M]=p[u].getAttribute("id");var K=this.pages.length;null==G.getName()&&G.setName(mxResources.get("pageWithNumber",
+[K+1]));f.model.execute(new ChangePage(this,G,G,K,!0));q.push(G)}this.updatePageLinks(b,q)}}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]);n&&this.insertHandler(d,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{f.model.endUpdate()}}}catch(B){if(k)throw B;this.handleError(B)}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(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(H){}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(M){e({message:mxResources.get("errorLoadingFile")})}});d.readAsText(b)}else this.doImportVisio(b,c,e,g)}catch(E){e(E)}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(E){e({})}});n.send(d)}else try{this.doImportVisio(b,c,e,g)}catch(H){e(H)}}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(q){e(q)}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).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(H){}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(M){e({message:mxResources.get("errorLoadingFile")})}});d.readAsText(b)}else this.doImportVisio(b,c,e,g)}catch(E){e(E)}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(E){e({})}});p.send(d)}else try{this.doImportVisio(b,c,e,g)}catch(H){e(H)}}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)||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(q){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(q){null!=window.console&&console.error(q),e(q)}}else e({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=
+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",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(H){f=f||100,l=l||100}e(d.convertDataUri(Editor.createSvgDataUri(b)),f,l)}else g({message:mxResources.get("invalidInput")})}catch(H){g(H)}})}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)))),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(B){g(B)}};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(D){}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);
+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(B){g(B)}};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,q,n,t){q=null!=q?q:!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," ")],{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,q,!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,q,!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,q,!0,t);if(0<l.length)return l}catch(D){}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)+";"))}),n,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,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.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,q,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,q,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,
@@ -3569,23 +3570,23 @@ function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize)
function(b,d,c){StorageFile.deleteFile(this,b,d,c)});if(!c){var e=Editor.useLocalStorage;Editor.useLocalStorage=!b}window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));window.openFile.setConsumer(mxUtils.bind(this,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,p,t,y,x,C,H){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!=H?mxEvent.isControlDown(H):null);null!=t&&t(d)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=C?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(f=this.importXml(c,e,g,x,null,null!=H?mxEvent.isControlDown(H):null),y=!0)),y||(c=this.editor.graph,C=b.indexOf(";"),0<C&&(b=b.substring(0,C)+b.substring(b.indexOf(",",C+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!=H?mxEvent.isControlDown(H):null));d||null==t||t(f);return f};EditorUi.prototype.importFiles=function(b,c,e,g,k,n,p,t,y,x,C,H,D){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=C||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,H,D)}catch(pa){return this.handleError(pa),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=[],B=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=H?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)?B(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"),x=f.getAttribute("height"),p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,x=null!=x&&"%"!=x.charAt(x.length-1)?parseFloat(x):NaN,u=f.getAttribute("viewBox");if(null==u||0==u.length)f.setAttribute("viewBox","0 0 "+p+" "+x);else if(isNaN(p)||isNaN(x)){var B=u.split(" ");3<B.length&&(p=parseFloat(B[2]),x=parseFloat(B[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(f));
-var N=Math.min(1,Math.min(g/Math.max(1,p)),g/Math.max(1,x)),D=k(q,n.type,c+d*m,e+d*m,Math.max(1,Math.round(p*N)),Math.max(1,Math.round(x*N)),n.name);if(isNaN(p)||isNaN(x)){var y=new Image;y.onload=mxUtils.bind(this,function(){p=Math.max(1,y.width);x=Math.max(1,y.height);D[0].geometry.width=p;D[0].geometry.height=x;f.setAttribute("viewBox","0 0 "+p+" "+x);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,[D[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return D}}}catch(ea){}return null})):B(d,mxUtils.bind(this,function(){return k(N,"text/xml",c+d*m,e+d*m,0,0,n.name)}))}else B(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==n.type){var D=H?null:this.extractGraphModelFromPng(b.target.result);if(null!=D&&0<D.length){var y=new Image;y.src=b.target.result;B(d,mxUtils.bind(this,function(){return k(D,"text/xml",c+d*m,e+d*m,y.width,y.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){B(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=f&&this.isResampleImageSize(n.size,C)?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,C,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){B(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){B(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?
+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,v,y,x,C,H){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!=H?mxEvent.isControlDown(H):null);null!=v&&v(d)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=C?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(f=this.importXml(c,e,g,x,null,null!=H?mxEvent.isControlDown(H):null),y=!0)),y||(c=this.editor.graph,C=b.indexOf(";"),0<C&&(b=b.substring(0,C)+b.substring(b.indexOf(",",C+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!=v&&v(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);v(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!=H?mxEvent.isControlDown(H):null));d||null==v||v(f);return f};EditorUi.prototype.importFiles=function(b,c,e,g,k,n,t,v,y,x,C,H,D){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=C||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,H,D)}catch(pa){return this.handleError(pa),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,u=[],B=mxUtils.bind(this,function(b,d){u[b]=d;if(0==--q){this.spinner.stop();if(null!=v)v(u);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<u.length;e++){var f=u[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=H?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)?B(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"),x=f.getAttribute("height"),t=null!=t&&"%"!=t.charAt(t.length-1)?parseFloat(t):NaN,x=null!=x&&"%"!=x.charAt(x.length-1)?parseFloat(x):NaN,u=f.getAttribute("viewBox");if(null==u||0==u.length)f.setAttribute("viewBox","0 0 "+t+" "+x);else if(isNaN(t)||isNaN(x)){var B=u.split(" ");3<B.length&&(t=parseFloat(B[2]),x=parseFloat(B[3]))}n=Editor.createSvgDataUri(mxUtils.getXml(f));
+var N=Math.min(1,Math.min(g/Math.max(1,t)),g/Math.max(1,x)),D=k(n,p.type,c+d*m,e+d*m,Math.max(1,Math.round(t*N)),Math.max(1,Math.round(x*N)),p.name);if(isNaN(t)||isNaN(x)){var y=new Image;y.onload=mxUtils.bind(this,function(){t=Math.max(1,y.width);x=Math.max(1,y.height);D[0].geometry.width=t;D[0].geometry.height=x;f.setAttribute("viewBox","0 0 "+t+" "+x);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,[D[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return D}}}catch(ea){}return null})):B(d,mxUtils.bind(this,function(){return k(N,"text/xml",c+d*m,e+d*m,0,0,p.name)}))}else B(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==p.type){var D=H?null:this.extractGraphModelFromPng(b.target.result);if(null!=D&&0<D.length){var y=new Image;y.src=b.target.result;B(d,mxUtils.bind(this,function(){return k(D,"text/xml",c+d*m,e+d*m,y.width,y.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){B(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=f&&this.isResampleImageSize(p.size,C)?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,C,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){B(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){B(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"),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(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 M=document.createElement("canvas");M.width=m;M.height=q;var G=M.toDataURL();u!==G&&(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(q){if(null!=e)e(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:
+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 u=q.toDataURL();if(u.length<c.length){var M=document.createElement("canvas");M.width=m;M.height=p;var G=M.toDataURL();u!==G&&(c=u,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,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()}},
@@ -3608,11 +3609,11 @@ this.styleInput.value)})),E.appendChild(this.styleInput),this.editor.graph.getSe
this.styleInput?!0:M.apply(this,arguments)}}E=document.getElementById("geInfo");null!=E&&E.parentNode.removeChild(E);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)),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="+
+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,l,!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!=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",
+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 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="&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),
@@ -3636,7 +3637,7 @@ function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.
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 p=f.lastIndexOf("%3E");0<=p&&p<f.length-3&&(f=f.substring(0,p+3))}catch(H){}try{k=d.getElementsByTagName("span"),m=
+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(H){}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(H){}try{if(null!=f&&0<f.length){this.pasteXml(f,g,l,b);try{mxEvent.consume(b)}catch(H){}}else if(!e){var t=this.editor.graph;t.lastPasteXml=null;t.pasteCounter=0}}catch(H){this.handleError(H)}}}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"):
@@ -3661,49 +3662,49 @@ window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh(
pageVisible:d.pageVisible,translate:d.view.translate,bounds:d.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:d.view.scale,page:d.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(){var b=this.editor.graph;b.isEditing()&&b.stopEditing(!b.isInvokesStopCellEditing());var c=window.opener||window.parent;this.editor.modified?this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),b,null,!0,mxUtils.bind(this,function(b){c.postMessage(JSON.stringify({event:"export",
data:Editor.createSvgDataUri(b)}),"*")}),null,null,!0,this.embedExportBackground,1,this.embedExportBorder):c.postMessage(JSON.stringify({event:"exit"}),"*");this.diagramContainer.removeAttribute("data-bounds");Editor.inlineFullscreen=!1;b.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);this.editor.modified=!1;this.fireEvent(new mxEventObject("editInlineStop"))};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=null,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(na){}return b});if("json"==urlParams.proto){var n=!1;try{k=JSON.parse(k)}catch(ja){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 q=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(q.container,300,80,!0,!1);q.init();return}if("draft"==k.action){var t=m(k.xml);this.spinner.stop();q=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),t,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(q.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{q.init()}catch(ja){p.postMessage(JSON.stringify({event:"draft",error:ja.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var u=1==k.enableRecent,v=1==k.enableSearch,
-B=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&!k.templatesOnly&&null!=k.callback){var y=this.getCurrentUser(),O=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!=y?y.id:null,u?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",
+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(na){}return b});if("json"==urlParams.proto){var p=!1;try{k=JSON.parse(k)}catch(ja){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 q=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(q.container,300,80,!0,!1);q.init();return}if("draft"==k.action){var t=m(k.xml);this.spinner.stop();q=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),t,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(q.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{q.init()}catch(ja){n.postMessage(JSON.stringify({event:"draft",error:ja.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var u=1==k.enableRecent,v=1==k.enableSearch,
+B=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&!k.templatesOnly&&null!=k.callback){var y=this.getCurrentUser(),O=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!=y?y.id:null,u?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",
[c],null,b,d)}):null,v?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,B?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(O.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}q=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,u?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,"Network Error!")})}):null,v?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,B?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==k.withoutType);this.showDialog(q.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();b&&this.actions.get("exit").funct()}));q.init();return}if("textContent"==k.action){var da=
-this.getDiagramTextContent();p.postMessage(JSON.stringify({event:"textContent",data:da,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 N=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,
-N):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var Q=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var X=this.editor.graph,F=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=Q;p.postMessage(JSON.stringify(d),
-"*")}),J=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(Q)));X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);F(b)}),A=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var aa=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=A){var b=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());
-for(var d,c=0;c<this.pages.length;c++)if(this.pages[c].getId()==A){d=this.updatePageRoot(this.pages[c]);break}null==d&&(d=this.currentPage);X.getGlobalVariable=function(c){return"page"==c?d.getName():"pagenumber"==c?1:b.apply(this,arguments)};document.body.appendChild(X.container);X.model.setRoot(d.root)}if(null!=k.layerIds){for(var e=X.model,f=e.getChildCells(e.getRoot()),g={},c=0;c<k.layerIds.length;c++)g[k.layerIds[c]]=!0;for(c=0;c<f.length;c++)e.setVisible(f[c],g[f[c].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,
-function(b){J(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){J(null)}),null,null,k.scale,k.transparent,k.shadow,null,X,k.border,null,k.grid,k.keepTheme)});null!=k.xml&&0<k.xml.length?(c=!0,this.setFileData(Q),c=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(aa)},0):aa()):aa()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=A?"&pageId="+A:"")+(null!=k.layerIds&&0<k.layerIds.length?
-"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(Q))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?F("data:image/png;base64,"+b.getText()):J(null)}),mxUtils.bind(this,function(){J(null)}))}}else aa=mxUtils.bind(this,function(){var b=this.createLoadMessage("export");b.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var d=
-this.getXmlFileData();b.xml=mxUtils.getXml(d);b.data=this.getFileData(null,null,!0,null,null,null,d);b.format=k.format}else if("html"==k.format)d=this.editor.getGraphXml(),b.data=this.getHtml(d,this.editor.graph),b.xml=mxUtils.getXml(d),b.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;d=null!=k.background?k.background:this.editor.graph.background;d==mxConstants.NONE&&(d=null);b.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);b.format="svg";var c=mxUtils.bind(this,
-function(d){this.editor.graph.setEnabled(!0);this.spinner.stop();b.data=Editor.createSvgDataUri(d);p.postMessage(JSON.stringify(b),"*")});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(b.xml,this.editor.graph,null,!0,c,null,null,k.embedImages,d,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),d=this.editor.graph.getSvg(d,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(d),this.embedFonts(d,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){c(mxUtils.getXml(b))})):c(mxUtils.getXml(b))}));return}p.postMessage(JSON.stringify(b),"*")}),null!=k.xml&&
-0<k.xml.length?(c=!0,this.setFileData(k.xml),c=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(aa)},0):aa()):aa();return}if("load"==k.action){n=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);if(null!=k.rough){var I=Editor.sketchMode;
-this.doSetSketchMode(k.rough);I!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=k.dark&&(I=Editor.darkMode,this.doSetDarkMode(k.dark),I!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=k.border&&(this.embedExportBorder=k.border);var W=this.embedExportBorder;null!=k.background&&(this.embedExportBackground=k.background);null!=k.rect&&(this.diagramContainer.style.border="2px solid #295fcc",this.diagramContainer.style.top=k.rect.top+"px",this.diagramContainer.style.left=
-k.rect.left+"px",this.diagramContainer.style.height=k.rect.height+"px",this.diagramContainer.style.width=k.rect.width+"px",this.diagramContainer.style.bottom="",this.diagramContainer.style.right="",l=mxUtils.bind(this,function(){var b=this.editor.graph,d=b.maxFitScale;b.maxFitScale=k.maxFitScale;b.fit(2*W);b.maxFitScale=d;b.container.scrollTop-=2*W;b.container.scrollLeft-=2*W;this.fireEvent(new mxEventObject("editInlineStart","data",[k]))}));null!=k.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=
-k.noExitBtn);null!=k.title&&null!=this.buttonContainer&&(t=document.createElement("span"),mxUtils.write(t,k.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(t),this.embedFilenameSpan=t);try{k.libs&&this.sidebar.showEntries(k.libs)}catch(ja){}k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.descriptor?k.descriptor:k.xml}else{if("merge"==k.action){var ba=this.getCurrentFile();null!=ba&&(t=m(k.xml),
-null!=t&&""!=t&&ba.mergeFile(new LocalFile(this,t),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(ja){this.handleError(ja)}}var oa=
-mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),fa=mxUtils.bind(this,function(f,k){c=!0;try{b(f,k,null,n)}catch(ka){this.handleError(ka)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");g=oa();e&&null==d&&(d=mxUtils.bind(this,function(b,d){var e=oa();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 m=this.createLoadMessage("load");m.xml=f;p.postMessage(JSON.stringify(m),"*")}null!=l&&l()});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(m="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(b){fa(b,f)},mxUtils.bind(this,function(b){this.handleError(b)}),m)):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)&&fa(b.responseText,f)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(b){fa(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):
-null==k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=m(k),fa(k,f)):this.loadDescriptor(k,mxUtils.bind(this,function(b){fa(oa(),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&&"1"!=urlParams.embedInline){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"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"!=
+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,u?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,"Network Error!")})}):null,v?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,B?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==k.withoutType);this.showDialog(q.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();b&&this.actions.get("exit").funct()}));q.init();return}if("textContent"==k.action){var da=
+this.getDiagramTextContent();n.postMessage(JSON.stringify({event:"textContent",data:da,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 N=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,
+N):this.spinner.stop();return}if("exit"==k.action)this.actions.get("exit").funct();else{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 Q=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var X=this.editor.graph,F=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=Q;n.postMessage(JSON.stringify(d),"*")}),J=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(Q)));X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);F(b)}),A=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var aa=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=
+A){var b=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());for(var d,c=0;c<this.pages.length;c++)if(this.pages[c].getId()==A){d=this.updatePageRoot(this.pages[c]);break}null==d&&(d=this.currentPage);X.getGlobalVariable=function(c){return"page"==c?d.getName():"pagenumber"==c?1:b.apply(this,arguments)};document.body.appendChild(X.container);X.model.setRoot(d.root)}if(null!=k.layerIds){for(var e=X.model,f=e.getChildCells(e.getRoot()),g={},c=0;c<k.layerIds.length;c++)g[k.layerIds[c]]=
+!0;for(c=0;c<f.length;c++)e.setVisible(f[c],g[f[c].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){J(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){J(null)}),null,null,k.scale,k.transparent,k.shadow,null,X,k.border,null,k.grid,k.keepTheme)});null!=k.xml&&0<k.xml.length?(c=!0,this.setFileData(Q),c=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(aa)},0):aa()):aa()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+
+("xmlpng"==k.format?"1":"0")+(null!=A?"&pageId="+A:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(Q))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?F("data:image/png;base64,"+b.getText()):J(null)}),mxUtils.bind(this,function(){J(null)}))}}else aa=mxUtils.bind(this,function(){var b=this.createLoadMessage("export");b.message=k;if("html2"==
+k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var d=this.getXmlFileData();b.xml=mxUtils.getXml(d);b.data=this.getFileData(null,null,!0,null,null,null,d);b.format=k.format}else if("html"==k.format)d=this.editor.getGraphXml(),b.data=this.getHtml(d,this.editor.graph),b.xml=mxUtils.getXml(d),b.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;d=null!=k.background?k.background:this.editor.graph.background;d==mxConstants.NONE&&(d=null);b.xml=this.getFileData(!0,
+null,null,null,null,null,null,null,null,!1);b.format="svg";var c=mxUtils.bind(this,function(d){this.editor.graph.setEnabled(!0);this.spinner.stop();b.data=Editor.createSvgDataUri(d);n.postMessage(JSON.stringify(b),"*")});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(b.xml,this.editor.graph,null,!0,c,null,null,k.embedImages,d,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),d=this.editor.graph.getSvg(d,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(d),this.embedFonts(d,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){c(mxUtils.getXml(b))})):
+c(mxUtils.getXml(b))}));return}n.postMessage(JSON.stringify(b),"*")}),null!=k.xml&&0<k.xml.length?(c=!0,this.setFileData(k.xml),c=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(aa)},0):aa()):aa();return}if("load"==k.action){p=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);if(null!=k.rough){var I=Editor.sketchMode;this.doSetSketchMode(k.rough);I!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=k.dark&&(I=Editor.darkMode,this.doSetDarkMode(k.dark),I!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=k.border&&(this.embedExportBorder=k.border);var W=this.embedExportBorder;null!=k.background&&(this.embedExportBackground=k.background);null!=k.rect&&(this.diagramContainer.style.border=
+"2px solid #295fcc",this.diagramContainer.style.top=k.rect.top+"px",this.diagramContainer.style.left=k.rect.left+"px",this.diagramContainer.style.height=k.rect.height+"px",this.diagramContainer.style.width=k.rect.width+"px",this.diagramContainer.style.bottom="",this.diagramContainer.style.right="",l=mxUtils.bind(this,function(){var b=this.editor.graph,d=b.maxFitScale;b.maxFitScale=k.maxFitScale;b.fit(2*W);b.maxFitScale=d;b.container.scrollTop-=2*W;b.container.scrollLeft-=2*W;this.fireEvent(new mxEventObject("editInlineStart",
+"data",[k]))}));null!=k.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=k.noExitBtn);null!=k.title&&null!=this.buttonContainer&&(t=document.createElement("span"),mxUtils.write(t,k.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(t),this.embedFilenameSpan=t);try{k.libs&&this.sidebar.showEntries(k.libs)}catch(ja){}k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.descriptor?k.descriptor:
+k.xml}else{if("merge"==k.action){var ba=this.getCurrentFile();null!=ba&&(t=m(k.xml),null!=t&&""!=t&&ba.mergeFile(new LocalFile(this,t),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(ja){this.handleError(ja)}}var oa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),fa=mxUtils.bind(this,function(f,k){c=!0;try{b(f,k,null,p)}catch(ka){this.handleError(ka)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");g=oa();e&&null==d&&(d=mxUtils.bind(this,function(b,d){var e=oa();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 m=this.createLoadMessage("load");m.xml=f;n.postMessage(JSON.stringify(m),"*")}null!=l&&l()});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(m="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(b){fa(b,f)},mxUtils.bind(this,function(b){this.handleError(b)}),
+m)):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)&&fa(b.responseText,f)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(b){fa(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):
+null==k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=m(k),fa(k,f)):this.loadDescriptor(k,mxUtils.bind(this,function(b){fa(oa(),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&&"1"!=urlParams.embedInline){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"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||"1"==urlParams.atlas?"42px":"52px"}};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=[],k={};if(0<d.length){var p={},t=null,x=null,C=null,H=null,D=null,E=null,M="whiteSpace=wrap;html=1;",G=null,K=null,B="",L="auto",O="auto",da=null,N=null,Q=40,X=40,F=100,J=0,A=this.editor.graph;A.getGraphBounds();for(var aa=function(){null!=c?c(qa):(A.setSelectionCells(qa),
+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=[],k={};if(0<d.length){var n={},t=null,x=null,C=null,H=null,D=null,E=null,M="whiteSpace=wrap;html=1;",G=null,K=null,B="",L="auto",O="auto",da=null,N=null,Q=40,X=40,F=100,J=0,A=this.editor.graph;A.getGraphBounds();for(var aa=function(){null!=c?c(qa):(A.setSelectionCells(qa),
A.scrollCellToVisible(A.getSelectionCell()))},I=A.getFreeInsertPoint(),W=I.x,ba=I.y,I=ba,oa=null,fa="auto",K=null,ja=[],na=null,pa=null,ka=0;ka<d.length&&"#"==d[ka].charAt(0);){b=d[ka];for(ka++;ka<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[ka].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[ka].substring(1)),ka++;if("#"!=b.charAt(1)){var Y=b.indexOf(":");if(0<Y){var Z=mxUtils.trim(b.substring(1,Y)),R=mxUtils.trim(b.substring(Y+1));"label"==Z?oa=A.sanitizeHtml(R):"labelname"==Z&&0<R.length&&
"-"!=R?D=R:"labels"==Z&&0<R.length&&"-"!=R?E=JSON.parse(R):"style"==Z?x=R:"parentstyle"==Z?M=R:"stylename"==Z&&0<R.length&&"-"!=R?H=R:"styles"==Z&&0<R.length&&"-"!=R?C=JSON.parse(R):"vars"==Z&&0<R.length&&"-"!=R?t=JSON.parse(R):"identity"==Z&&0<R.length&&"-"!=R?G=R:"parent"==Z&&0<R.length&&"-"!=R?K=R:"namespace"==Z&&0<R.length&&"-"!=R?B=R:"width"==Z?L=R:"height"==Z?O=R:"left"==Z&&0<R.length?da=R:"top"==Z&&0<R.length?N=R:"ignore"==Z?pa=R.split(","):"connect"==Z?ja.push(JSON.parse(R)):"link"==Z?na=
-R:"padding"==Z?J=parseFloat(R):"edgespacing"==Z?Q=parseFloat(R):"nodespacing"==Z?X=parseFloat(R):"levelspacing"==Z?F=parseFloat(R):"layout"==Z&&(fa=R)}}}if(null==d[ka])throw Error(mxResources.get("invalidOrMissingFile"));for(var sa=this.editor.csvToArray(d[ka]),Z=Y=null,R=[],U=0;U<sa.length;U++)G==sa[U]&&(Y=U),K==sa[U]&&(Z=U),R.push(mxUtils.trim(sa[U]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==oa&&(oa="%"+R[0]+"%");if(null!=ja)for(var T=0;T<ja.length;T++)null==p[ja[T].to]&&
-(p[ja[T].to]={});G=[];for(U=ka+1;U<d.length;U++){var ma=this.editor.csvToArray(d[U]);if(null==ma){var va=40<d[U].length?d[U].substring(0,40)+"...":d[U];throw Error(va+" ("+U+"):\n"+mxResources.get("containsValidationErrors"));}0<ma.length&&G.push(ma)}A.model.beginUpdate();try{for(U=0;U<G.length;U++){var ma=G[U],S=null,ea=null!=Y?B+ma[Y]:null;null!=ea&&(S=A.model.getCell(ea));var d=null!=S,ha=new mxCell(oa,new mxGeometry(W,I,0,0),x||"whiteSpace=wrap;html=1;");ha.vertex=!0;ha.id=ea;for(var ia=0;ia<
+R:"padding"==Z?J=parseFloat(R):"edgespacing"==Z?Q=parseFloat(R):"nodespacing"==Z?X=parseFloat(R):"levelspacing"==Z?F=parseFloat(R):"layout"==Z&&(fa=R)}}}if(null==d[ka])throw Error(mxResources.get("invalidOrMissingFile"));for(var sa=this.editor.csvToArray(d[ka]),Z=Y=null,R=[],U=0;U<sa.length;U++)G==sa[U]&&(Y=U),K==sa[U]&&(Z=U),R.push(mxUtils.trim(sa[U]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==oa&&(oa="%"+R[0]+"%");if(null!=ja)for(var T=0;T<ja.length;T++)null==n[ja[T].to]&&
+(n[ja[T].to]={});G=[];for(U=ka+1;U<d.length;U++){var ma=this.editor.csvToArray(d[U]);if(null==ma){var va=40<d[U].length?d[U].substring(0,40)+"...":d[U];throw Error(va+" ("+U+"):\n"+mxResources.get("containsValidationErrors"));}0<ma.length&&G.push(ma)}A.model.beginUpdate();try{for(U=0;U<G.length;U++){var ma=G[U],S=null,ea=null!=Y?B+ma[Y]:null;null!=ea&&(S=A.model.getCell(ea));var d=null!=S,ha=new mxCell(oa,new mxGeometry(W,I,0,0),x||"whiteSpace=wrap;html=1;");ha.vertex=!0;ha.id=ea;for(var ia=0;ia<
ma.length;ia++)A.setAttributeForCell(ha,R[ia],ma[ia]);if(null!=D&&null!=E){var la=E[ha.getAttribute(D)];null!=la&&A.labelChanged(ha,la)}if(null!=H&&null!=C){var ta=C[ha.getAttribute(H)];null!=ta&&(ha.style=ta)}A.setAttributeForCell(ha,"placeholders","1");ha.style=A.replacePlaceholders(ha,ha.style,t);d?(A.model.setValue(S,ha.value),A.model.setStyle(S,ha.style),0>mxUtils.indexOf(g,S)&&g.push(S),A.fireEvent(new mxEventObject("cellsInserted","cells",[S]))):A.fireEvent(new mxEventObject("cellsInserted",
-"cells",[ha]));S=ha;if(!d)for(T=0;T<ja.length;T++)p[ja[T].to][S.getAttribute(ja[T].to)]=S;null!=na&&"link"!=na&&(A.setLinkForCell(S,S.getAttribute(na)),A.setAttributeForCell(S,na,null));var P=this.editor.graph.getPreferredSizeForCell(S),K=null!=Z?A.model.getCell(B+ma[Z]):null;if(S.vertex){va=null!=K?0:W;ka=null!=K?0:ba;null!=da&&null!=S.getAttribute(da)&&(S.geometry.x=va+parseFloat(S.getAttribute(da)));null!=N&&null!=S.getAttribute(N)&&(S.geometry.y=ka+parseFloat(S.getAttribute(N)));var ca="@"==L.charAt(0)?
+"cells",[ha]));S=ha;if(!d)for(T=0;T<ja.length;T++)n[ja[T].to][S.getAttribute(ja[T].to)]=S;null!=na&&"link"!=na&&(A.setLinkForCell(S,S.getAttribute(na)),A.setAttributeForCell(S,na,null));var P=this.editor.graph.getPreferredSizeForCell(S),K=null!=Z?A.model.getCell(B+ma[Z]):null;if(S.vertex){va=null!=K?0:W;ka=null!=K?0:ba;null!=da&&null!=S.getAttribute(da)&&(S.geometry.x=va+parseFloat(S.getAttribute(da)));null!=N&&null!=S.getAttribute(N)&&(S.geometry.y=ka+parseFloat(S.getAttribute(N)));var ca="@"==L.charAt(0)?
S.getAttribute(L.substring(1)):null;S.geometry.width=null!=ca&&"auto"!=ca?parseFloat(S.getAttribute(L.substring(1))):"auto"==L||"auto"==ca?P.width+J:parseFloat(L);var wa="@"==O.charAt(0)?S.getAttribute(O.substring(1)):null;S.geometry.height=null!=wa&&"auto"!=wa?parseFloat(wa):"auto"==O||"auto"==wa?P.height+J:parseFloat(O);I+=S.geometry.height+X}d?(null==k[ea]&&(k[ea]=[]),k[ea].push(S)):(e.push(S),null!=K?(K.style=A.replacePlaceholders(K,M,t),A.addCell(S,K),f.push(K)):g.push(A.addCell(S)))}for(U=0;U<
-f.length;U++)ca="@"==L.charAt(0)?f[U].getAttribute(L.substring(1)):null,wa="@"==O.charAt(0)?f[U].getAttribute(O.substring(1)):null,"auto"!=L&&"auto"!=ca||"auto"!=O&&"auto"!=wa||A.updateGroupBounds([f[U]],J,!0);for(var ya=g.slice(),qa=g.slice(),T=0;T<ja.length;T++)for(var za=ja[T],U=0;U<e.length;U++){var S=e[U],Aa=mxUtils.bind(this,function(b,d,c){var e=d.getAttribute(c.from);if(null!=e&&""!=e)for(var e=e.split(","),f=0;f<e.length;f++){var g=p[c.to][e[f]];if(null!=g){var k=c.label;null!=c.fromlabel&&
+f.length;U++)ca="@"==L.charAt(0)?f[U].getAttribute(L.substring(1)):null,wa="@"==O.charAt(0)?f[U].getAttribute(O.substring(1)):null,"auto"!=L&&"auto"!=ca||"auto"!=O&&"auto"!=wa||A.updateGroupBounds([f[U]],J,!0);for(var ya=g.slice(),qa=g.slice(),T=0;T<ja.length;T++)for(var za=ja[T],U=0;U<e.length;U++){var S=e[U],Aa=mxUtils.bind(this,function(b,d,c){var e=d.getAttribute(c.from);if(null!=e&&""!=e)for(var e=e.split(","),f=0;f<e.length;f++){var g=n[c.to][e[f]];if(null!=g){var k=c.label;null!=c.fromlabel&&
(k=(d.getAttribute(c.fromlabel)||"")+(k||""));null!=c.sourcelabel&&(k=A.replacePlaceholders(d,c.sourcelabel,t)+(k||""));null!=c.tolabel&&(k=(k||"")+(g.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(k=(k||"")+A.replacePlaceholders(g,c.targetlabel,t));var l="target"==c.placeholders==!c.invert?g:b,l=null!=c.style?A.replacePlaceholders(l,c.style,t):A.createCurrentEdgeStyle(),k=A.insertEdge(null,null,k||"",c.invert?g:b,c.invert?b:g,l);if(null!=c.labels)for(l=0;l<c.labels.length;l++){var m=c.labels[l],
-n=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?m.y:0,0,0),"resizable=0;html=1;");n.vertex=!0;n.connectable=!1;n.geometry.relative=!0;null!=m.placeholders&&(n.value=A.replacePlaceholders("target"==m.placeholders==!c.invert?g:b,n.value,t));if(null!=m.dx||null!=m.dy)n.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);k.insert(n)}qa.push(k);mxUtils.remove(c.invert?b:g,ya)}}});Aa(S,S,za);if(null!=k[S.id])for(ia=0;ia<k[S.id].length;ia++)Aa(S,k[S.id][ia],za)}if(null!=pa)for(U=
+p=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?m.y:0,0,0),"resizable=0;html=1;");p.vertex=!0;p.connectable=!1;p.geometry.relative=!0;null!=m.placeholders&&(p.value=A.replacePlaceholders("target"==m.placeholders==!c.invert?g:b,p.value,t));if(null!=m.dx||null!=m.dy)p.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);k.insert(p)}qa.push(k);mxUtils.remove(c.invert?b:g,ya)}}});Aa(S,S,za);if(null!=k[S.id])for(ia=0;ia<k[S.id].length;ia++)Aa(S,k[S.id][ia],za)}if(null!=pa)for(U=
0;U<e.length;U++)for(S=e[U],ia=0;ia<pa.length;ia++)A.setAttributeForCell(S,mxUtils.trim(pa[ia]),null);if(0<g.length){var Da=new mxParallelEdgeLayout(A);Da.spacing=Q;Da.checkOverlap=!0;var Ea=function(){0<Da.spacing&&Da.execute(A.getDefaultParent());for(var b=0;b<g.length;b++){var d=A.getCellGeometry(g[b]);d.x=Math.round(A.snap(d.x));d.y=Math.round(A.snap(d.y));"auto"==L&&(d.width=Math.round(A.snap(d.width)));"auto"==O&&(d.height=Math.round(A.snap(d.height)))}};if("["==fa.charAt(0)){var Ka=aa;A.view.validate();
this.executeLayoutList(JSON.parse(fa),function(){Ea();Ka()});aa=null}else if("circle"==fa){var Ba=new mxCircleLayout(A);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var Ha=Ba.isVertexIgnored;Ba.isVertexIgnored=function(b){return Ha.apply(this,arguments)||0>mxUtils.indexOf(g,b)};this.executeLayout(function(){Ba.execute(A.getDefaultParent());Ea()},!0,aa);aa=null}else if("horizontaltree"==fa||"verticaltree"==fa||"auto"==fa&&qa.length==2*g.length-1&&1==ya.length){A.view.validate();var Fa=new mxCompactTreeLayout(A,
"horizontaltree"==fa);Fa.levelDistance=X;Fa.edgeRouting=!1;Fa.resetEdges=!1;this.executeLayout(function(){Fa.execute(A.getDefaultParent(),0<ya.length?ya[0]:null)},!0,aa);aa=null}else if("horizontalflow"==fa||"verticalflow"==fa||"auto"==fa&&1==ya.length){A.view.validate();var V=new mxHierarchicalLayout(A,"horizontalflow"==fa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);V.intraCellSpacing=X;V.parallelEdgeSpacing=Q;V.interRankCellSpacing=F;V.disableEdgeStyle=!1;this.executeLayout(function(){V.execute(A.getDefaultParent(),
@@ -3713,66 +3714,66 @@ e;for(e in urlParams)0>mxUtils.indexOf(c,e)&&(b=0==d?b+"?":b+"&",null!=urlParams
d++;null!=this.gitHub&&d++;null!=this.gitLab&&d++;null!=this.notion&&d++;b&&isLocalStorage&&"1"==urlParams.browser&&d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();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 p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);var b=this.editor.graph,
+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!=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,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,c){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(c||"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+=
+(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,e,g,k,n,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,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()};v&&(q.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});b.saveRequest(c,e,function(b,c){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(c||"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,v,t):b.exportImage(k,!1,!0,!1,!1,n,!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 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 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"))+
+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 d=0;d<b.length;d++){var e=b[d];k[e.id]&&(c[e.id]=e);var f=this.addCheckbox(g,e.title,k[e.id]);(function(b,d){mxEvent.addListener(d,"change",function(){this.checked?c[b.id]=b:delete c[b.id]})})(e,f)}},mxUtils.bind(this,function(b){g.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"));g.appendChild(c)}));
d.appendChild(g);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==k[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(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){b--;0==b&&this.spinner.stop();this.handleError(null,
mxResources.get("errorLoadingFile"))}))})(c[d]));for(d in k)c[d]||this.closeLibrary(new RemoteLibrary(this,null,k[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,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(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 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);
+"*")});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(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(B){console.log(B)}}),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(B){console.log(B)}});b=mxUtils.bind(this,function(b){try{if(b.source==c.contentWindow){var g=
-{};try{g=JSON.parse(b.data)}catch(L){}"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]?p(g.resp[0]):l())}}catch(L){console.log(L)}});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,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(d){null==d||".scratchpad"==b&&d==this.emptyLibraryXml?c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(B){console.log(B)}}),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(B){console.log(B)}});b=mxUtils.bind(this,function(b){try{if(b.source==c.contentWindow){var g=
+{};try{g=JSON.parse(b.data)}catch(L){}"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(L){console.log(L)}});window.addEventListener("message",b)}})));b(d);d.onversionchange=
+function(){d.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(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(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,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();
+f.onsuccess=function(){b(f.result)};f.onerror=c}catch(q){null!=c&&c(q)}}),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,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,C,H,D,E,M,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,g,k,p,t,v,
+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,v){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(b,c,e,g,k,n,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,n,t,v,y,x,C,H,D,E,M,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,g,k,n,t,v,
y,x,C,H,D,E,M,G)};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,p){function t(){for(var b=H.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==H&&c++;D.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 m(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function q(b){b.style.border="";b.removeChild(b.busyImg)}function n(c,e,g,k,p){function B(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)});X.appendChild(f);e&&(f.style.display="none")}function x(){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=Q;b(c);return{pdiv:e,replies:d}}function N(e,f,g,p,t){function v(){l(D);c.addReply(N,function(b){N.id=b;c.replies.push(N);q(D);g&&g()},function(c){u();m(D);b.handleError(c,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},p,t)}function u(){d(N,D,function(b){v()},!0)}var B=x().pdiv,N=b.newComment(e,b.getCurrentUser());N.pCommentId=c.id;null==c.replies&&(c.replies=[]);var D=n(N,c.replies,B,k+1);f?u():v()}if(p||!c.isResolved){D.style.display="none";var Q=document.createElement("div");Q.className="geCommentContainer";Q.setAttribute("data-commentId",c.id);Q.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(Q.style.backgroundColor="ghostWhite");
+var CommentsWindow=function(b,c,e,k,g,n){function t(){for(var b=H.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==H&&c++;D.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 B(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)});X.appendChild(f);e&&(f.style.display="none")}function x(){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=Q;b(c);return{pdiv:e,replies:d}}function N(e,f,g,n,t){function v(){l(D);c.addReply(N,function(b){N.id=b;c.replies.push(N);p(D);g&&g()},function(c){u();m(D);b.handleError(c,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},n,t)}function u(){d(N,D,function(b){v()},!0)}var B=x().pdiv,N=b.newComment(e,b.getCurrentUser());N.pCommentId=c.id;null==c.replies&&(c.replies=[]);var D=q(N,c.replies,B,k+1);f?u():v()}if(n||!c.isResolved){D.style.display="none";var Q=document.createElement("div");Q.className="geCommentContainer";Q.setAttribute("data-commentId",c.id);Q.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(Q.style.backgroundColor="ghostWhite");
var E=document.createElement("div");E.className="geCommentHeader";var C=document.createElement("img");C.className="geCommentUserImg";C.src=c.user.pictureUrl||Editor.userImage;E.appendChild(C);C=document.createElement("div");C.className="geCommentHeaderTxt";E.appendChild(C);var L=document.createElement("div");L.className="geCommentUsername";mxUtils.write(L,c.user.displayName||"");C.appendChild(L);L=document.createElement("div");L.className="geCommentDate";L.setAttribute("data-commentId",c.id);f(c,
L);C.appendChild(L);Q.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,c.content||"");Q.appendChild(E);c.isLocked&&(Q.style.opacity="0.5");E=document.createElement("div");E.className="geCommentActions";var X=document.createElement("ul");X.className="geCommentActionsList";E.appendChild(X);u||c.isLocked||0!=k&&!v||B(mxResources.get("reply"),function(){N("",!0)},c.isResolved);C=b.getCurrentUser();null==C||C.id!=c.user.id||u||c.isLocked||(B(mxResources.get("edit"),
-function(){function e(){d(c,Q,function(){l(Q);c.editComment(c.content,function(){q(Q)},function(c){m(Q);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),B(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(Q);c.deleteComment(function(b){if(!0===b){b=Q.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=Q.querySelectorAll(".geCommentAction");for(b=
-0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);q(Q);Q.style.opacity="0.5"}else{d=x(c).replies;for(b=0;b<d.length;b++)H.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}D.style.display=0==H.getElementsByTagName("div").length?"block":"none"}},function(c){m(Q);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=k||B(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
+function(){function e(){d(c,Q,function(){l(Q);c.editComment(c.content,function(){p(Q)},function(c){m(Q);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),B(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(Q);c.deleteComment(function(b){if(!0===b){b=Q.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=Q.querySelectorAll(".geCommentAction");for(b=
+0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);p(Q);Q.style.opacity="0.5"}else{d=x(c).replies;for(b=0;b<d.length;b++)H.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}D.style.display=0==H.getElementsByTagName("div").length?"block":"none"}},function(c){m(Q);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=k||B(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=x(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);G||(f[k].style.display="none")}t()}c.isResolved?N(mxResources.get("reOpened")+": ",!0,
-d,!1,!0):N(mxResources.get("markedAsResolved"),!1,d,!0)});Q.appendChild(E);null!=g?H.insertBefore(Q,g.nextSibling):H.appendChild(Q);for(g=0;null!=c.replies&&g<c.replies.length;g++)E=c.replies[g],E.isResolved=c.isResolved,n(E,c.replies,null,k+1,p);null!=y&&(y.comment.id==c.id?(p=c.content,c.content=y.comment.content,d(c,Q,y.saveCallback,y.deleteOnCancel),c.content=p):null==y.comment.id&&y.comment.pCommentId==c.id&&(H.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return Q}}
+d,!1,!0):N(mxResources.get("markedAsResolved"),!1,d,!0)});Q.appendChild(E);null!=g?H.insertBefore(Q,g.nextSibling):H.appendChild(Q);for(g=0;null!=c.replies&&g<c.replies.length;g++)E=c.replies[g],E.isResolved=c.isResolved,q(E,c.replies,null,k+1,n);null!=y&&(y.comment.id==c.id?(n=c.content,c.content=y.comment.content,d(c,Q,y.saveCallback,y.deleteOnCancel),c.content=n):null==y.comment.id&&y.comment.pCommentId==c.id&&(H.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return Q}}
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 C=EditorUi.compactUi?"26px":"30px",H=document.createElement("div");H.className="geCommentsList";H.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";H.style.bottom=parseInt(C)+7+"px";x.appendChild(H);var D=document.createElement("span");D.style.cssText="display:none;padding-top:10px;text-align:center;";
mxUtils.write(D,mxResources.get("noCommentsFound"));var E=document.createElement("div");E.className="geToolbarContainer geCommentsToolbar";E.style.height=C;E.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";E.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C=document.createElement("a");C.className="geButton";if(!u){var M=C.cloneNode();M.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';M.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(M,"click",function(c){function e(){d(f,g,function(c){l(g);b.addComment(c,function(b){c.id=b;K.push(c);q(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=n(f,K,null,0);e();c.preventDefault();mxEvent.consume(c)});E.appendChild(M)}M=C.cloneNode();M.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';M.setAttribute("title",mxResources.get("showResolved"));
+"...");mxEvent.addListener(M,"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)});E.appendChild(M)}M=C.cloneNode();M.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';M.setAttribute("title",mxResources.get("showResolved"));
var G=!1;Editor.isDarkMode()&&(M.style.filter="invert(100%)");mxEvent.addListener(M,"click",function(b){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";B();b.preventDefault();mxEvent.consume(b)});E.appendChild(M);b.commentsRefreshNeeded()&&(M=C.cloneNode(),M.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',M.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(M.style.filter="invert(100%)"),mxEvent.addListener(M,"click",function(b){B();
-b.preventDefault();mxEvent.consume(b)}),E.appendChild(M));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(C.style.filter="invert(100%)"),mxEvent.addListener(C,"click",function(b){p();b.preventDefault();mxEvent.consume(b)}),E.appendChild(C));x.appendChild(E);var K=[],B=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);
+b.preventDefault();mxEvent.consume(b)}),E.appendChild(M));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(C.style.filter="invert(100%)"),mxEvent.addListener(C,"click",function(b){n();b.preventDefault();mxEvent.consume(b)}),E.appendChild(C));x.appendChild(E);var K=[],B=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)}H.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)});H.innerHTML="";H.appendChild(D);D.style.display="block";K=b;for(b=0;b<K.length;b++)c(K[b].replies),n(K[b],K,null,0,G);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(H.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
+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)});H.innerHTML="";H.appendChild(D);D.style.display="block";K=b;for(b=0;b<K.length;b++)c(K[b].replies),q(K[b],K,null,0,G);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(H.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
": "+b.message:""));this.hasError=!0})):H.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});B();this.refreshComments=B;E=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=H.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(E,6E4);this.refreshCommentsTime=E;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 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()}},ConfirmDialog=function(b,c,e,
-k,g,p,t,d,f,l,m){var q=document.createElement("div");q.style.textAlign="center";m=null!=m?m:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=m+"px";n.style.lineHeight="1.2em";mxUtils.write(n,c);q.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),q.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);q.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),q.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=q};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,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 u=document.createElement("input");u.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=k&&k(u.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 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(n);p.appendChild(l);f?(l.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),q.appendChild(g),p.appendChild(q),mxEvent.addListener(g,
+"click",function(b){u.checked=!u.checked;mxEvent.consume(b)})):l.style.marginTop="12px";this.init=function(){v.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")};
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))}
@@ -3782,15 +3783,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,g=this.createTemporaryGraph(e.getStylesheet());g.defaultForegroundColor=e.defaultForegroundColor;var p=this.getPageIndex(null!=c?c:this.currentPage);g.getGlobalVariable=function(b){return"pagenumber"==b?p+1:"page"==b&&null!=c?c.getName():k.apply(this,arguments)};document.body.appendChild(g.container);this.updatePageRoot(b);g.model.setRoot(b.root);b=g.getSvg(null,null,null,null,null,null,null,
+EditorUi.prototype.getImageForPage=function(b,c,e){e=null!=e?e:this.editor.graph;var k=e.getGlobalVariable,g=this.createTemporaryGraph(e.getStylesheet());g.defaultForegroundColor=e.defaultForegroundColor;var n=this.getPageIndex(null!=c?c:this.currentPage);g.getGlobalVariable=function(b){return"pagenumber"==b?n+1:"page"==b&&null!=c?c.getName():k.apply(this,arguments)};document.body.appendChild(g.container);this.updatePageRoot(b);g.model.setRoot(b.root);b=g.getSvg(null,null,null,null,null,null,null,
null,null,null,null,!0);e=g.getGraphBounds();document.body.removeChild(g.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),e.width,e.height,e.x,e.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")),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:
+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:
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",
@@ -3806,17 +3807,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(p){this.handleError(p)}};
+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.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 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.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.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,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()?Editor.darkColor:"#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);
+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()?Editor.darkColor:"#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);
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()};
@@ -3826,11 +3827,11 @@ 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),p=mxEvent.getClientY(b);c.popup(e,p,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),n=mxEvent.getClientY(b);c.popup(e,n,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"),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.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.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"),
@@ -3840,33 +3841,33 @@ f=new EmbedDialog(this,this.getLinkForPage(b,c,f));this.showDialog(f.container,4
(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,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=
+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=
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"==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 B=v.model.getTerminal(q[u],!1);if(k==d(B)){var x=v.view.getState(B);B!=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(B=v.model.getTerminal(q[u],!1),k==d(B)&&(x=v.view.getState(B),B!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY()))){var D=[];v.traverse(x.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&D.push(c);(null==c||d)&&D.push(b);return null==c||d});v.moveCells(D,(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 m(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(pa){}}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,B=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)/B-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)/B-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)/B-u.y+-n.y+10);return v.addCells(k,e)}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 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=q(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||
+!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),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(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 B=v.model.getTerminal(q[u],!1);if(k==d(B)){var x=v.view.getState(B);B!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY())&&mxUtils.intersects(p,x)&&(f=10+Math.max(f,(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:f=0;for(u=0;u<q.length;u++)if(B=v.model.getTerminal(q[u],!1),k==d(B)&&(x=v.view.getState(B),B!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY()))){var D=[];v.traverse(x.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&D.push(c);(null==c||d)&&D.push(b);return null==c||d});v.moveCells(D,(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,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(f,g)}finally{v.model.endUpdate()}}function m(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),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(pa){}}var f=v.getOutgoingTreeEdges(b),p=e.geometry,l=[];v.view.currentRoot==e&&(p=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,B=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)/B-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)/B-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)/B-u.y+-p.y+10);return v.addCells(k,e)}finally{v.model.endUpdate()}}function p(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 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?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=p(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 C=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 C.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 H=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=H.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 D=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 B=v.view.getState(p);null!=B&&(d=(B.getCenterX()-u.getCenterX())/v.view.scale,e=(B.getCenterY()-u.getCenterY())/v.view.scale)}}}}m=D.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 E=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
+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 D=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 B=v.view.getState(n);null!=B&&(d=(B.getCenterX()-u.getCenterX())/v.view.scale,e=(B.getCenterY()-u.getCenterY())/v.view.scale)}}}}m=D.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 E=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
function(c,d,e,f){var g=v.model,k=null;g.beginUpdate();try{if(k=E.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 M={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)?l(v.getSelectionCell()):m(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=M[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(F){u.handleError(F)}mxEvent.isConsumed(c)||G.apply(this,arguments)};var K=v.connectVertex;v.connectVertex=function(c,e,g,k,p,n,q){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=d(c),B=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return u==e||0==t.length?m(c,e):B==x?l(c):f(c,e!=mxConstants.DIRECTION_NORTH&&e!=mxConstants.DIRECTION_WEST)}return K.apply(this,arguments)};v.getSubtree=function(d){var e=
+v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=M[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(q(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(c))}}catch(F){u.handleError(F)}mxEvent.isConsumed(c)||G.apply(this,arguments)};var K=v.connectVertex;v.connectVertex=function(c,e,g,k,n,p,q){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=d(c),B=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return u==e||0==t.length?m(c,e):B==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 B=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){B.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;u.hoverIcons.reset();mxEvent.consume(b)})))};var L=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){L.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var O=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){O.apply(this,
@@ -3875,9 +3876,9 @@ function(){var b=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimla
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 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 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);q.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(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",
+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 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(q);b.insert(v);b.insert(c);b.insert(d);b.insert(g);b.insert(p);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"};');
@@ -3904,7 +3905,7 @@ EditorUi.prototype.setDarkMode=function(b){this.spinner.spin(document.body,mxRes
"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.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";c.defaultForegroundColor=Editor.isDarkMode()?"#f0f0f0":"#000000";c.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";c.graphHandler.previewColor=Editor.isDarkMode()?
"#cccccc":"black";c.defaultPageBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";Graph.prototype.defaultPageBackgroundColor=c.defaultPageBackgroundColor;document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";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()?Editor.darkColor:"white";StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"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;p.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==g.parentNode&&document.getElementsByTagName("head")[0].appendChild(g):null!=g.parentNode&&g.parentNode.removeChild(g)}};Editor.createMinimalCss=
+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;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; }html body .mxCellEditor { color: #f0f0f0; }":
"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()?Editor.darkColor:"#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: "+
@@ -3912,7 +3913,7 @@ function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindo
(Editor.isDarkMode()?Editor.darkColor:"#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()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#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 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;
+(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;
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;";
@@ -3920,8 +3921,8 @@ b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Edit
"1"!=urlParams.embedInline){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){if("0"!=urlParams.saveAndExit){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";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var q=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=q.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","-",
+b.appendChild(c));this.buttonContainer.appendChild(b);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};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"]),"1"==urlParams.embedInline||!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&&
@@ -3934,49 +3935,49 @@ new ParseDialog(d,"Insert from Text");d.showDialog(b.container,620,420,!0,!1);b.
"...",function(){b(d)})).shortcut=d.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!d.isOffline()&&d.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var b=new ParseDialog(d,mxResources.get("plantUml")+"...","plantUml");d.showDialog(b.container,620,420,!0,!1);b.init()}));d.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var b=new ParseDialog(d,mxResources.get("mermaid")+"...","mermaid");d.showDialog(b.container,620,420,!0,!1);
b.init()}));var g=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(b,c){var d=this.editorUi.editor.graph,e=d.getSelectionCell();g.call(this,b,e,null,c);this.addMenuItems(b,["editTooltip"],c);d.model.isVertex(e)&&this.addMenuItems(b,["editGeometry"],c);this.addMenuItems(b,["-","edit"],c)})));this.addPopupMenuCellEditItems=function(b,c,d,e){b.addSeparator();this.addSubmenu("editCell",b,e,mxResources.get("edit"))};this.put("diagram",new Menu(mxUtils.bind(this,function(b,
c){var e=d.getCurrentFile();d.menus.addSubmenu("extras",b,c,mxResources.get("preferences"));b.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(b,"new open - synchronize - save saveAs -".split(" "),c):"1"==urlParams.embed?("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(b,["-","save"],c),("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&d.menus.addMenuItems(b,["saveAndExit"],c),b.addSeparator(c)):d.mode==
-App.MODE_ATLAS?d.menus.addMenuItems(b,["save","synchronize","-"],c):(d.menus.addMenuItems(b,["new"],c),d.menus.addSubmenu("openFrom",b,c),isLocalStorage&&this.addSubmenu("openRecent",b,c),"1"!=urlParams.sketch&&(b.addSeparator(c),null!=e&&e.constructor==DriveFile&&d.menus.addMenuItems(b,["share"],c),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||d.menus.addMenuItems(b,["synchronize"],c)),b.addSeparator(c),d.menus.addSubmenu("save",b,c));d.menus.addSubmenu("exportAs",
-b,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(b,["import"],c):d.menus.addSubmenu("importFrom",b,c);"1"!=urlParams.sketch&&(d.menus.addMenuItems(b,["-","outline"],c),d.commentsSupported()&&d.menus.addMenuItems(b,["comments"],c));d.menus.addMenuItems(b,["-","findReplace","layers","tags"],c);d.menus.addMenuItems(b,["-","pageSetup","pageScale"],c);mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(b,["print"],c);null!=e&&null!=d.fileNode&&"1"!=urlParams.embedInline&&
-(e=null!=e.getTitle()?e.getTitle():d.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["-","properties"]));b.addSeparator(c);d.menus.addSubmenu("help",b,c);"1"==urlParams.embed?"1"!=urlParams.noExitBtn&&d.menus.addMenuItems(b,["-","exit"],c):d.menus.addMenuItems(b,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(b,c){var e=d.getCurrentFile();null!=e&&e.constructor==DriveFile?d.menus.addMenuItems(b,["save","makeCopy","-","rename","moveToFolder"],
-c):(d.menus.addMenuItems(b,["save","saveAs","-","rename"],c),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(b,["upload"],c):d.menus.addMenuItems(b,["makeCopy"],c));"1"!=urlParams.sketch||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||d.menus.addMenuItems(b,["-","synchronize"],c);d.menus.addMenuItems(b,["-","autosave"],c);null!=e&&e.isRevisionHistorySupported()&&d.menus.addMenuItems(b,["-","revisionHistory"],
-c)})));var k=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){k.funct(b,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||d.menus.addMenuItems(b,["publishLink"],c);d.mode!=App.MODE_ATLAS&&(b.addSeparator(c),d.menus.addSubmenu("embed",b,c))})));var l=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(b,c){d.menus.addInsertTableCellItem(b,c)})));var m=this.get("importFrom");this.put("importFrom",new Menu(mxUtils.bind(this,function(b,c){m.funct(b,
-c);this.addMenuItems(b,["editDiagram"],c);"1"==urlParams.sketch&&(b.addSeparator(c),b.addItem(mxResources.get("csv")+"...",null,function(){d.showImportCsvDialog()},c,null,mxUtils.bind(e,e.isEnabled)),d.addInsertMenuItems(b,c,["formatSql","-","fromText","plantUml","mermaid"]))})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&d.menus.addSubmenu("theme",b,c);null!=l&&d.menus.addSubmenu("language",b,c);d.menus.addSubmenu("units",b,c);b.addSeparator(c);d.menus.addMenuItems(b,
-"scrollbars tooltips ruler - copyConnect collapseExpand -".split(" "),c);"1"==urlParams.sketch&&this.addMenuItems(b,["toggleSketchMode"],c);"1"!=urlParams.embedInline&&(this.addMenuItems(b,["toggleDarkMode"],c),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&d.menus.addMenuItems(b,["-","showStartScreen","search","scratchpad"],c),"1"==urlParams.sketch&&null==urlParams.pages&&this.addMenuItems(b,["togglePagesVisible"],c));b.addSeparator(c);d.menus.addMenuItem(b,"configuration",c);!d.isOfflineApp()&&
-isLocalStorage&&d.menus.addMenuItem(b,"plugins",c);this.addMenuItems(b,["-","fullscreen"],c);b.addSeparator(c)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,c){d.menus.addMenuItems(b,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),c)})));mxUtils.bind(this,function(){var b=this.get("insert"),c=b.funct;b.funct=function(b,e){"1"==urlParams.sketch?(d.menus.addMenuItems(b,["insertFreehand"],e),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(b,
-["insertTemplate"],e)):(c.apply(this,arguments),d.menus.addSubmenu("table",b,e),b.addSeparator(e));d.menus.addMenuItems(b,["-","toggleShapes"],e)}})();var n="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),p=function(b,c,e,f){b.addItem(e,null,mxUtils.bind(this,function(){var b=new CreateGraphDialog(d,e,f);d.showDialog(b.container,620,420,!0,!1);b.init()}),c)};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 C=!1;EditorUi.prototype.initFormatWindow=function(){if(!C){C=!0;this.formatWindow.window.setClosable(!1);var b=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){b.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()}))}};var H=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(b,c,d){var e=m.menus.get(b),f=t.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),q);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("+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?p.insertBefore(k,m.statusContainer):p.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),n.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?p.insertBefore(d,m.statusContainer):p.appendChild(d);return d}function k(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(W.style.left=58>I.offsetTop-I.offsetHeight/2?"70px":"10px");else{for(var b=p.firstChild;null!=b;){var c=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=c}q=p.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var b=1E3>e||"1"==urlParams.sketch,k=null;b||(k=d("diagram"));
-c=b?d("diagram",null,Editor.drawLogoImage):null;null!=c&&(k=c);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);c=d("insert",!0,b?A:null);g([c,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<=e&&(g([ea,ha],60),520<=e&&g([wa,640<=e?f("",sa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",sa,Editor.zoomInImage):null,640<=e?f("",U.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",U,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));c=m.menus.get("language");null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e&&"1"!=urlParams.sketch?(null==qa&&(c=t.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.className="geToolbarButton",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="24px 24px",c.style.position=
-"absolute",c.style.height="24px",c.style.width="24px",c.style.zIndex="1",c.style.right="8px",c.style.cursor="pointer",c.style.top="1"==urlParams.embed?"12px":"11px",p.appendChild(c),qa=c),m.buttonContainer.style.paddingRight="34px"):(m.buttonContainer.style.paddingRight="4px",null!=qa&&(qa.parentNode.removeChild(qa),qa=null))}H.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?
-mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);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<=e||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])c(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);("1"==urlParams.sketch||1E3<=e)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch&&(this.initFormatWindow(),this.formatWindow.window.toggleMinimized()));var m=this,n=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));m.defaultLibraryName=
-mxResources.get("untitledLibrary");var p=document.createElement("div");p.className="geMenubarContainer";var q=null,t=new Menubar(m,p);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 u=m.hideCurrentMenu;m.hideCurrentMenu=function(){u.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
-var v=m.descriptorChanged;m.descriptorChanged=function(){v.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);p.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else p.removeAttribute("title")};m.setStatusText(m.editor.getStatus());p.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;";p.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,x=document.createElement("div");x.style.cssText=
-"position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";m.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var y=m.menus.get("viewZoom"),A="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,C="1"==urlParams.sketch?document.createElement("div"):null,I="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null,ba=mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(n.stylesheet.styles),
-this.sidebar.graph.defaultForegroundColor=n.defaultForegroundColor,this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));n.refresh();n.view.validateBackground()});m.addListener("darkModeChanged",ba);m.addListener("sketchModeChanged",ba);var oa=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)W.style.left="10px",W.style.top="10px",I.style.left="10px",I.style.top="60px",C.style.top="10px",C.style.right=
-"12px",C.style.left="",m.diagramContainer.setAttribute("data-bounds",m.diagramContainer.style.top+" "+m.diagramContainer.style.left+" "+m.diagramContainer.style.width+" "+m.diagramContainer.style.height),m.diagramContainer.style.top="0px",m.diagramContainer.style.left="0px",m.diagramContainer.style.bottom="0px",m.diagramContainer.style.right="0px",m.diagramContainer.style.width="",m.diagramContainer.style.height="";else{var b=m.diagramContainer.getAttribute("data-bounds");if(null!=b){m.diagramContainer.style.background=
-"transparent";m.diagramContainer.removeAttribute("data-bounds");var c=n.getGraphBounds(),b=b.split(" ");m.diagramContainer.style.top=b[0];m.diagramContainer.style.left=b[1];m.diagramContainer.style.width=c.width+50+"px";m.diagramContainer.style.height=c.height+46+"px";m.diagramContainer.style.bottom="";m.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:m.diagramContainer.getBoundingClientRect()}),"*");m.refresh()}W.style.left=m.diagramContainer.offsetLeft+
-"px";W.style.top=m.diagramContainer.offsetTop-W.offsetHeight-4+"px";I.style.display="";I.style.left=m.diagramContainer.offsetLeft-I.offsetWidth-4+"px";I.style.top=m.diagramContainer.offsetTop+"px";C.style.left=m.diagramContainer.offsetLeft+m.diagramContainer.offsetWidth-C.offsetWidth+"px";C.style.top=W.style.top;C.style.right="";m.bottomResizer.style.left=m.diagramContainer.offsetLeft+(m.diagramContainer.offsetWidth-m.bottomResizer.offsetWidth)/2+"px";m.bottomResizer.style.top=m.diagramContainer.offsetTop+
-m.diagramContainer.offsetHeight-m.bottomResizer.offsetHeight/2-1+"px";m.rightResizer.style.left=m.diagramContainer.offsetLeft+m.diagramContainer.offsetWidth-m.rightResizer.offsetWidth/2-1+"px";m.rightResizer.style.top=m.diagramContainer.offsetTop+(m.diagramContainer.offsetHeight-m.bottomResizer.offsetHeight)/2+"px"}m.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";m.rightResizer.style.visibility=m.bottomResizer.style.visibility;p.style.display="none";W.style.visibility="";C.style.visibility=
-""}),fa=mxUtils.bind(this,function(){ia.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";oa()}),ba=mxUtils.bind(this,function(){fa();b(m,!0);m.initFormatWindow();var c=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(c.x+c.width+4,c.y)});m.addListener("inlineFullscreenChanged",fa);m.addListener("editInlineStart",
-ba);"1"==urlParams.embedInline&&m.addListener("darkModeChanged",ba);m.addListener("editInlineStop",mxUtils.bind(this,function(b){m.diagramContainer.style.width="10px";m.diagramContainer.style.height="10px";m.diagramContainer.style.border="";m.bottomResizer.style.visibility="hidden";m.rightResizer.style.visibility="hidden";W.style.visibility="hidden";C.style.visibility="hidden";I.style.display="none"}));Graph.touchStyle&&(n.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==
-b.getState()&&!mxEvent.isMouseEvent(c)&&!n.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=m.hoverIcons){var ja=m.hoverIcons.update;m.hoverIcons.update=function(){n.freehand.isDrawing()||ja.apply(this,arguments)}}if(null!=n.freehand){var na=n.freehand.createStyle;n.freehand.createStyle=function(b){return na.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){I.className="geToolbarContainer";C.className="geToolbarContainer";
-W.className="geToolbarContainer";p.className="geToolbarContainer";m.picker=I;var pa=!1;mxEvent.addListener(p,"mouseenter",function(){m.statusContainer.style.display="inline-block"});mxEvent.addListener(p,"mouseleave",function(){pa||(m.statusContainer.style.display="none")});var ka=mxUtils.bind(this,function(b){null!=m.notificationBtn&&(null!=b?m.notificationBtn.setAttribute("title",b):m.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed?(p.style.visibility=14>p.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&&"function"===typeof m.statusContainer.firstChild.getAttribute&&null==m.statusContainer.firstChild.getAttribute("class")){var b=null!=m.statusContainer.firstChild&&"function"===typeof m.statusContainer.firstChild.getAttribute?m.statusContainer.firstChild.getAttribute("title"):m.editor.getStatus();ka(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",pa=!0):6<m.buttonContainer.clientWidth&&(m.statusContainer.style.display="none",pa=!1)}else m.statusContainer.style.display="inline-block",ka(null),pa=!0;p.style.visibility=12<p.clientWidth?"":"hidden"}))):m.editor.addListener("statusChanged",
-mxUtils.bind(this,function(){p.style.visibility=16<p.clientWidth?"":"hidden"}));P=d("diagram",null,Editor.menuImage);P.style.boxShadow="none";P.style.padding="6px";P.style.margin="0px";W.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);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(e-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 Y=document.createElement("a");Y.style.padding="0px";Y.style.boxShadow="none";Y.className="geMenuItem";Y.style.display="inline-block";
-Y.style.width="40px";Y.style.height="12px";Y.style.marginBottom="-2px";Y.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Y.style.backgroundPosition="top center";Y.style.backgroundRepeat="no-repeat";Y.setAttribute("title","Minimize");var Z=!1,R=mxUtils.bind(this,function(){I.innerHTML="";if(!Z){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(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)");c(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;",
+App.MODE_ATLAS?d.menus.addMenuItems(b,["save","synchronize","-"],c):"1"!=urlParams.noFileMenu&&(d.menus.addMenuItems(b,["new"],c),d.menus.addSubmenu("openFrom",b,c),isLocalStorage&&this.addSubmenu("openRecent",b,c),"1"!=urlParams.sketch&&(b.addSeparator(c),null!=e&&e.constructor==DriveFile&&d.menus.addMenuItems(b,["share"],c),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||d.menus.addMenuItems(b,["synchronize"],c)),b.addSeparator(c),d.menus.addSubmenu("save",b,c));
+d.menus.addSubmenu("exportAs",b,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(b,["import"],c):"1"!=urlParams.noFileMenu&&d.menus.addSubmenu("importFrom",b,c);"1"!=urlParams.sketch&&(d.menus.addMenuItems(b,["-","outline"],c),d.commentsSupported()&&d.menus.addMenuItems(b,["comments"],c));d.menus.addMenuItems(b,["-","findReplace","layers","tags"],c);d.menus.addMenuItems(b,["-","pageSetup","pageScale"],c);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(b,
+["print"],c);null!=e&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(e=null!=e.getTitle()?e.getTitle():d.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["-","properties"]));b.addSeparator(c);d.menus.addSubmenu("help",b,c);"1"==urlParams.embed?"1"!=urlParams.noExitBtn&&d.menus.addMenuItems(b,["-","exit"],c):"1"!=urlParams.noFileMenu&&d.menus.addMenuItems(b,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(b,c){var e=d.getCurrentFile();null!=e&&e.constructor==
+DriveFile?d.menus.addMenuItems(b,["save","makeCopy","-","rename","moveToFolder"],c):(d.menus.addMenuItems(b,["save","saveAs","-","rename"],c),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(b,["upload"],c):d.menus.addMenuItems(b,["makeCopy"],c));"1"!=urlParams.sketch||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||d.menus.addMenuItems(b,["-","synchronize"],c);d.menus.addMenuItems(b,["-","autosave"],c);null!=e&&
+e.isRevisionHistorySupported()&&d.menus.addMenuItems(b,["-","revisionHistory"],c)})));var k=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){k.funct(b,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||d.menus.addMenuItems(b,["publishLink"],c);d.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(b.addSeparator(c),d.menus.addSubmenu("embed",b,c))})));var l=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(b,c){d.menus.addInsertTableCellItem(b,c)})));
+var m=this.get("importFrom");this.put("importFrom",new Menu(mxUtils.bind(this,function(b,c){m.funct(b,c);this.addMenuItems(b,["editDiagram"],c);"1"==urlParams.sketch&&(b.addSeparator(c),b.addItem(mxResources.get("csv")+"...",null,function(){d.showImportCsvDialog()},c,null,mxUtils.bind(e,e.isEnabled)),d.addInsertMenuItems(b,c,["formatSql","-","fromText","plantUml","mermaid"]))})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.menus.addSubmenu("theme",
+b,c);null!=l&&d.menus.addSubmenu("language",b,c);d.menus.addSubmenu("units",b,c);b.addSeparator(c);d.menus.addMenuItems(b,"scrollbars tooltips ruler - copyConnect collapseExpand -".split(" "),c);"1"==urlParams.sketch&&this.addMenuItems(b,["toggleSketchMode"],c);"1"!=urlParams.embedInline&&(this.addMenuItems(b,["toggleDarkMode"],c),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&d.menus.addMenuItems(b,["-","showStartScreen","search","scratchpad"],c),"1"==urlParams.sketch&&null==urlParams.pages&&
+this.addMenuItems(b,["togglePagesVisible"],c));b.addSeparator(c);d.menus.addMenuItem(b,"configuration",c);!d.isOfflineApp()&&isLocalStorage&&d.menus.addMenuItem(b,"plugins",c);this.addMenuItems(b,["-","fullscreen"],c);b.addSeparator(c)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,c){d.menus.addMenuItems(b,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),c)})));mxUtils.bind(this,function(){var b=this.get("insert"),c=b.funct;b.funct=function(b,
+e){"1"==urlParams.sketch?(d.menus.addMenuItems(b,["insertFreehand"],e),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(b,["insertTemplate"],e)):(c.apply(this,arguments),d.menus.addSubmenu("table",b,e),b.addSeparator(e));d.menus.addMenuItems(b,["-","toggleShapes"],e)}})();var n="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),p=function(b,c,e,f){b.addItem(e,null,mxUtils.bind(this,function(){var b=new CreateGraphDialog(d,e,f);d.showDialog(b.container,
+620,420,!0,!1);b.init()}),c)};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 C=!1;EditorUi.prototype.initFormatWindow=function(){if(!C){C=!0;this.formatWindow.window.setClosable(!1);var b=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){b.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()}))}};var H=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(b,c,d){var e=m.menus.get(b),
+f=t.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),q);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("+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?p.insertBefore(k,m.statusContainer):p.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),n.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?p.insertBefore(d,m.statusContainer):p.appendChild(d);return d}function k(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(W.style.left=58>I.offsetTop-I.offsetHeight/2?"70px":"10px");else{for(var b=p.firstChild;null!=b;){var c=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=c}q=p.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
+var b=1E3>e||"1"==urlParams.sketch,k=null;b||(k=d("diagram"));c=b?d("diagram",null,Editor.drawLogoImage):null;null!=c&&(k=c);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);c=d("insert",!0,b?A:null);
+g([c,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<=e&&(g([ea,ha],60),520<=e&&g([wa,640<=e?f("",sa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",sa,Editor.zoomInImage):null,640<=e?f("",U.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",U,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));c=m.menus.get("language");null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e&&"1"!=urlParams.sketch?(null==qa&&(c=t.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.className="geToolbarButton",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize=
+"24px 24px",c.style.position="absolute",c.style.height="24px",c.style.width="24px",c.style.zIndex="1",c.style.right="8px",c.style.cursor="pointer",c.style.top="1"==urlParams.embed?"12px":"11px",p.appendChild(c),qa=c),m.buttonContainer.style.paddingRight="34px"):(m.buttonContainer.style.paddingRight="4px",null!=qa&&(qa.parentNode.removeChild(qa),qa=null))}H.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:
+null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);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<=e||null!=urlParams.clibs||null!=urlParams.libs||
+null!=urlParams["search-shapes"])c(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);("1"==urlParams.sketch||1E3<=e)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch&&(this.initFormatWindow(),this.formatWindow.window.toggleMinimized()));var m=this,n=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));
+m.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.className="geMenubarContainer";var q=null,t=new Menubar(m,p);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 u=m.hideCurrentMenu;m.hideCurrentMenu=function(){u.apply(this,
+arguments);this.editor.graph.popupMenuHandler.hideMenu()};var v=m.descriptorChanged;m.descriptorChanged=function(){v.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);p.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else p.removeAttribute("title")};m.setStatusText(m.editor.getStatus());p.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;";p.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,x=document.createElement("div");x.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";m.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var y=m.menus.get("viewZoom"),A="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,C="1"==urlParams.sketch?document.createElement("div"):null,I="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null,ba=mxUtils.bind(this,
+function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(n.stylesheet.styles),this.sidebar.graph.defaultForegroundColor=n.defaultForegroundColor,this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));n.refresh();n.view.validateBackground()});m.addListener("darkModeChanged",ba);m.addListener("sketchModeChanged",ba);var oa=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)W.style.left=
+"10px",W.style.top="10px",I.style.left="10px",I.style.top="60px",C.style.top="10px",C.style.right="12px",C.style.left="",m.diagramContainer.setAttribute("data-bounds",m.diagramContainer.style.top+" "+m.diagramContainer.style.left+" "+m.diagramContainer.style.width+" "+m.diagramContainer.style.height),m.diagramContainer.style.top="0px",m.diagramContainer.style.left="0px",m.diagramContainer.style.bottom="0px",m.diagramContainer.style.right="0px",m.diagramContainer.style.width="",m.diagramContainer.style.height=
+"";else{var b=m.diagramContainer.getAttribute("data-bounds");if(null!=b){m.diagramContainer.style.background="transparent";m.diagramContainer.removeAttribute("data-bounds");var c=n.getGraphBounds(),b=b.split(" ");m.diagramContainer.style.top=b[0];m.diagramContainer.style.left=b[1];m.diagramContainer.style.width=c.width+50+"px";m.diagramContainer.style.height=c.height+46+"px";m.diagramContainer.style.bottom="";m.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
+rect:m.diagramContainer.getBoundingClientRect()}),"*");m.refresh()}W.style.left=m.diagramContainer.offsetLeft+"px";W.style.top=m.diagramContainer.offsetTop-W.offsetHeight-4+"px";I.style.display="";I.style.left=m.diagramContainer.offsetLeft-I.offsetWidth-4+"px";I.style.top=m.diagramContainer.offsetTop+"px";C.style.left=m.diagramContainer.offsetLeft+m.diagramContainer.offsetWidth-C.offsetWidth+"px";C.style.top=W.style.top;C.style.right="";m.bottomResizer.style.left=m.diagramContainer.offsetLeft+(m.diagramContainer.offsetWidth-
+m.bottomResizer.offsetWidth)/2+"px";m.bottomResizer.style.top=m.diagramContainer.offsetTop+m.diagramContainer.offsetHeight-m.bottomResizer.offsetHeight/2-1+"px";m.rightResizer.style.left=m.diagramContainer.offsetLeft+m.diagramContainer.offsetWidth-m.rightResizer.offsetWidth/2-1+"px";m.rightResizer.style.top=m.diagramContainer.offsetTop+(m.diagramContainer.offsetHeight-m.bottomResizer.offsetHeight)/2+"px"}m.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";m.rightResizer.style.visibility=
+m.bottomResizer.style.visibility;p.style.display="none";W.style.visibility="";C.style.visibility=""}),fa=mxUtils.bind(this,function(){ia.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";oa()}),ba=mxUtils.bind(this,function(){fa();b(m,!0);m.initFormatWindow();var c=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(c.x+
+c.width+4,c.y)});m.addListener("inlineFullscreenChanged",fa);m.addListener("editInlineStart",ba);"1"==urlParams.embedInline&&m.addListener("darkModeChanged",ba);m.addListener("editInlineStop",mxUtils.bind(this,function(b){m.diagramContainer.style.width="10px";m.diagramContainer.style.height="10px";m.diagramContainer.style.border="";m.bottomResizer.style.visibility="hidden";m.rightResizer.style.visibility="hidden";W.style.visibility="hidden";C.style.visibility="hidden";I.style.display="none"}));Graph.touchStyle&&
+(n.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!n.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=m.hoverIcons){var ja=m.hoverIcons.update;m.hoverIcons.update=function(){n.freehand.isDrawing()||ja.apply(this,arguments)}}if(null!=n.freehand){var na=n.freehand.createStyle;n.freehand.createStyle=function(b){return na.apply(this,arguments)+"sketch=0;"}}if("1"==
+urlParams.sketch){I.className="geToolbarContainer";C.className="geToolbarContainer";W.className="geToolbarContainer";p.className="geToolbarContainer";m.picker=I;var pa=!1;mxEvent.addListener(p,"mouseenter",function(){m.statusContainer.style.display="inline-block"});mxEvent.addListener(p,"mouseleave",function(){pa||(m.statusContainer.style.display="none")});var ka=mxUtils.bind(this,function(b){null!=m.notificationBtn&&(null!=b?m.notificationBtn.setAttribute("title",b):m.notificationBtn.removeAttribute("title"))});
+"1"!=urlParams.embed?(p.style.visibility=14>p.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&&"function"===typeof m.statusContainer.firstChild.getAttribute&&null==m.statusContainer.firstChild.getAttribute("class")){var b=null!=m.statusContainer.firstChild&&"function"===typeof m.statusContainer.firstChild.getAttribute?m.statusContainer.firstChild.getAttribute("title"):
+m.editor.getStatus();ka(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",pa=!0):6<m.buttonContainer.clientWidth&&(m.statusContainer.style.display="none",pa=!1)}else m.statusContainer.style.display="inline-block",ka(null),pa=!0;p.style.visibility=12<p.clientWidth?"":
+"hidden"}))):m.editor.addListener("statusChanged",mxUtils.bind(this,function(){p.style.visibility=16<p.clientWidth?"":"hidden"}));P=d("diagram",null,Editor.menuImage);P.style.boxShadow="none";P.style.padding="6px";P.style.margin="0px";W.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);
+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(e-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 Y=document.createElement("a");Y.style.padding="0px";Y.style.boxShadow=
+"none";Y.className="geMenuItem";Y.style.display="inline-block";Y.style.width="40px";Y.style.height="12px";Y.style.marginBottom="-2px";Y.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Y.style.backgroundPosition="top center";Y.style.backgroundRepeat="no-repeat";Y.setAttribute("title","Minimize");var Z=!1,R=mxUtils.bind(this,function(){I.innerHTML="";if(!Z){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(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)");c(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"));c(m.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(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,n.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(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=n.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,
20),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=c(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+
@@ -3998,7 +3999,7 @@ null!=m.actions.layersWindow&&m.actions.layersWindow.window.fit();null!=m.menus.
l.style.position="absolute";l.style.width="10px";l.style.height="10px";l.style.borderRadius="5px";l.style.border="1px solid gray";l.style.background="#ffffff";l.style.cursor="row-resize";m.diagramContainer.parentNode.appendChild(l);m.bottomResizer=l;var za=null,Aa=null,Da=null,Ea=null;mxEvent.addGestureListeners(l,function(b){Ea=parseInt(m.diagramContainer.style.height);Aa=mxEvent.getClientY(b);n.popupMenuHandler.hideMenu();mxEvent.consume(b)});l=l.cloneNode(!1);l.style.cursor="col-resize";m.diagramContainer.parentNode.appendChild(l);
m.rightResizer=l;mxEvent.addGestureListeners(l,function(b){Da=parseInt(m.diagramContainer.style.width);za=mxEvent.getClientX(b);n.popupMenuHandler.hideMenu();mxEvent.consume(b)});mxEvent.addGestureListeners(document.body,null,function(b){var c=!1;null!=za&&(m.diagramContainer.style.width=Math.max(20,Da+mxEvent.getClientX(b)-za)+"px",c=!0);null!=Aa&&(m.diagramContainer.style.height=Math.max(20,Ea+mxEvent.getClientY(b)-Aa)+"px",c=!0);c&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
fullscreen:Editor.inlineFullscreen,rect:m.diagramContainer.getBoundingClientRect()}),"*"),m.fireEvent(new mxEventObject("editInlineStart")),m.refresh())},function(b){null==za&&null==Aa||mxEvent.consume(b);Aa=za=null});n.defaultPageBackgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";m.bottomResizer.style.visibility="hidden";m.rightResizer.style.visibility="hidden";W.style.visibility="hidden";C.style.visibility="hidden";I.style.display=
-"none"}"1"==urlParams.prefetchFonts&&m.editor.loadFonts()}}};(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\nembedFonts=Embed Fonts\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\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\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;
+"none"}"1"==urlParams.prefetchFonts&&m.editor.loadFonts()}}};(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\nembedFonts=Embed Fonts\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\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\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="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><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="default"/><add as="fontColor" value="default"/></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="default"/><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="default"/><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"]?
@@ -4008,18 +4009,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 p=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!=p&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),p=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 u=this.graph.getGraphBounds;this.graph.getGraphBounds=function(b){var c=u.apply(this,arguments);b=this.backgroundImage;if(null!=b){var d=this.view.translate,e=this.view.scale,c=mxRectangle.fromRectangle(c);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 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 u=this.graph.getGraphBounds;this.graph.getGraphBounds=function(b){var c=u.apply(this,arguments);b=this.backgroundImage;if(null!=b){var d=this.view.translate,e=this.view.scale,c=mxRectangle.fromRectangle(c);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 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};
+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};
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 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.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.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),
@@ -4027,31 +4028,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 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",
+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",
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,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 m=p.getCell(k[l]);null!=m&&(t=!0,f[m.id]=!0)}else for(l=0;l<e.length;l++)m=p.getChildAt(p.root,parseInt(e[l])),null!=m&&(t=!0,f[m.id]=!0);for(l=
-0;t&&l<d;l++)m=p.getChildAt(p.root,l),p.setVisible(m,f[m.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.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.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,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?
+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?
"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)?p():t(30))}})}for(var l=this.toolbarItems,m=0,q=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");
+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,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 C=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");C.style.borderRightStyle="none";C.style.paddingLeft="0px";C.style.paddingRight="0px";e.appendChild(v);var H=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");H.style.paddingLeft="0px";H.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";C.style.display=v.style.display;H.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 D=this.graph.getModel(),E=b(mxUtils.bind(this,function(b){if(null!=q)q.parentNode.removeChild(q),
-q=null;else{q=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(q,"mouseleave",function(){q.parentNode.removeChild(q);q=null});b=E.getBoundingClientRect();q.style.width="140px";q.style.padding="2px 0px 2px 0px";q.style.border="1px solid #d0d0d0";q.style.backgroundColor="#eee";q.style.fontFamily=Editor.defaultHtmlFont;q.style.fontSize=
-"11px";q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(q,80);var c=mxUtils.getDocumentScrollOrigin(document);q.style.left=c.x+b.left-1+"px";q.style.top=c.y+b.bottom-2+"px";document.body.appendChild(q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");D.addListener(mxEvent.CHANGE,function(){E.style.display=1<D.getChildCount(D.root)?"inline-block":"none"});E.style.display=1<D.getChildCount(D.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var M=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=M.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");D.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){M.style.display=0<
+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 D=this.graph.getModel(),E=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=E.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");D.addListener(mxEvent.CHANGE,function(){E.style.display=1<D.getChildCount(D.root)?"inline-block":"none"});E.style.display=1<D.getChildCount(D.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var M=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!=u)u.parentNode.removeChild(u),u=null;else{u=q.div;mxEvent.addListener(u,"mouseleave",function(){u.parentNode.removeChild(u);u=null});b=M.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);q.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");D.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){M.style.display=0<
this.graph.getAllTags().length?"inline-block":"none"}));M.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 G=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"==G&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(e);var f=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=q&&(q.parentNode.removeChild(q),q=null);c.style.border=G});mxEvent.addListener(document,"mousemove",function(b){for(b=mxEvent.getSource(b);null!=b;){if(b==
-c||b==e||b==q)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"==G&&(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=G});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)};
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()}))};
@@ -4061,7 +4062,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()}),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,
+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,
"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};
@@ -4071,9 +4072,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 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=
+(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=
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"==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,M,G,K=function(){if((M=c.offsetWidth)!=q||(G=c.offsetHeight)!=t)m=!0,q=M,t=G;l()},B=function(b,c,d){b.attachEvent?
+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,M,G,K=function(){if((M=c.offsetWidth)!=q||(G=c.offsetHeight)!=t)m=!0,q=M,t=G;l()},B=function(b,c,d){b.attachEvent?
b.attachEvent("on"+c,d):b.addEventListener(c,d)};B(e,"scroll",K);B(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.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);
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 0d1c181c..44f43d47 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -192,16 +192,16 @@ window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=n
window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;
window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null);if(!a&&window.mxIsElectron&&(a=require("@electron/remote").app.getLocale(),null!=a)){var c=a.indexOf("-");0<=c&&(a=a.substring(0,c));a=a.toLowerCase()}}catch(d){isLocalStorage=!1}return a}();
window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",eu:"Euskara",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",
-he:"עברית",ar:"العربية",fa:"فارسی",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph",window.mxImageBasePath="mxgraph/images");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}window.location.hostname==DRAWIO_LIGHTBOX_URL.substring(DRAWIO_LIGHTBOX_URL.indexOf("//")+2)&&(urlParams.lightbox="1");"1"==urlParams.lightbox&&(urlParams.chrome="0");
-"1"==urlParams.embedInline&&(urlParams.embed="1",urlParams.ui="sketch",urlParams.plugins="0",urlParams.proto="json",urlParams.prefetchFonts="1");
-window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&isLocalStorage&&"undefined"!==typeof JSON&&"1"!=urlParams.lightbox)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}null==a&&"1"==urlParams.extAuth&&(a="sketch");try{null==a&&768>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null==urlParams.pages&&(urlParams.pages="1"),a="sketch")}catch(c){}"sketch"==a&&(urlParams.sketch=
-"1",a="min");return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
+he:"עברית",ar:"العربية",fa:"فارسی",th:"ไทย",ko:"한국어",ja:"日本語",zh:"简体中文","zh-tw":"繁體中文"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph",window.mxImageBasePath="mxgraph/images");if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1",urlParams.lightbox="1",urlParams.layers="1");
+window.location.hostname==DRAWIO_LIGHTBOX_URL.substring(DRAWIO_LIGHTBOX_URL.indexOf("//")+2)&&(urlParams.lightbox="1");"1"==urlParams.lightbox&&(urlParams.chrome="0");"1"==urlParams.embedInline&&(urlParams.embed="1",urlParams.ui="sketch",urlParams.plugins="0",urlParams.proto="json",urlParams.prefetchFonts="1");
+window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;"1"==urlParams.extAuth&&(a="sketch");if(null==a&&isLocalStorage&&"undefined"!==typeof JSON&&"1"!=urlParams.lightbox)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).ui||null)}catch(c){isLocalStorage=!1}try{null==a&&768>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)&&(null==urlParams.pages&&(urlParams.pages="1"),a="sketch")}catch(c){}"sketch"==a&&(urlParams.sketch="1",a="min");
+return a}();function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
(function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),b=!0;null!=a&&(b=JSON.parse(a).showStartScreen);0==b&&(urlParams.splash="0")}catch(d){}a=urlParams["export"];null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),EXPORT_URL=a);a=urlParams.gitlab;null!=a&&(a=decodeURIComponent(a),"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&(a="http://"+a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];
null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net",b=a.length-c.length,c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"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.5.8",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/"),
+"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="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.5.9",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,10 +2040,11 @@ Editor.lightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5
Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+";Editor.redoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==";
Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.tableImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTIwIDNINWMtMS4xIDAtMiAuOS0yIDJ2MTRjMCAxLjEuOSAyIDIgMmgxNWMxLjEgMCAyLS45IDItMlY1YzAtMS4xLS45LTItMi0yem0wIDJ2M0g1VjVoMTV6bS01IDE0aC01di05aDV2OXpNNSAxMGgzdjlINXYtOXptMTIgOXYtOWgzdjloLTN6Ii8+PC9zdmc+";
-Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dots",dispName:"Dots"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=!0;Editor.simpleLabels=!1;
-Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.darkColor="#2a2a2a";Editor.isDarkMode=function(b){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(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
+Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dots",dispName:"Dots"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;
+Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.darkColor="#2a2a2a";Editor.isDarkMode=function(b){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(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
Editor.prototype.editAsNew=function(b,c){var e=null!=c?"?title="+encodeURIComponent(c):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,g=mxUtils.bind(this,function(c){"ready"==c.data&&c.source==k&&(mxEvent.removeListener(window,"message",g),k.postMessage(b,"*"))});mxEvent.addListener(window,"message",g);k=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+
"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,c){var e=new Graph(null,c,null,null,b);e.transparentBackground=!1;var k=e.isCssTransformsSupported,g=this;e.isCssTransformsSupported=function(){return k.apply(this,arguments)&&(!g.chromeless||!mxClient.IS_SF)};this.chromeless||(e.isBlankLink=function(b){return!this.isExternalProtocol(b)});return e};
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=
@@ -2060,52 +2061,52 @@ 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,p,t,d,f,l,m){var q=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,C=Math.max(1,Math.round((y.width-e-v)/2)),H=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",
+function Dialog(b,c,e,k,g,n,t,d,f,l,m){var p=f?57:0,q=e,u=k,v=f?0:64,y=mxUtils.getDocumentSize();null!=window.innerHeight&&(y.height=window.innerHeight);var x=y.height,C=Math.max(1,Math.round((y.width-e-v)/2)),H=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";C+=y.x;H+=y.y;g&&document.body.appendChild(this.bg);var D=b.createDiv(f?"geTransDialog":"geDialog");g=this.getPosition(C,H,e,k);C=g.x;H=g.y;D.style.width=e+"px";D.style.height=k+"px";D.style.left=C+"px";D.style.top=H+"px";D.style.zIndex=
-this.zIndex;D.appendChild(c);document.body.appendChild(D);!d&&c.clientHeight>D.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=H+14+"px",p.style.left=C+e+38-q+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=
-p,!m)){var E=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){E=!0}),null,mxUtils.bind(this,function(d){E&&(b.hideDialog(!0),E=!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";C=Math.max(1,Math.round((f.width-e-v)/2));H=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(C,
-H,e,k);C=f.x;H=f.y;D.style.left=C+"px";D.style.top=H+"px";D.style.width=e+"px";D.style.height=k+"px";!d&&c.clientHeight>D.clientHeight-v&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=H+14+"px",this.dialogImg.style.left=C+e+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=D;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+this.zIndex;D.appendChild(c);document.body.appendChild(D);!d&&c.clientHeight>D.clientHeight-v&&(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=H+14+"px",n.style.left=C+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 E=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){E=!0}),null,mxUtils.bind(this,function(d){E&&(b.hideDialog(!0),E=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var f=l();null!=f&&(q=e=f.w,u=k=f.h)}f=mxUtils.getDocumentSize();x=f.height;this.bg.style.height=x+"px";C=Math.max(1,Math.round((f.width-e-v)/2));H=Math.max(1,Math.round((x-k-b.footerHeight)/3));e=null!=document.body?Math.min(q,document.body.scrollWidth-v):q;k=Math.min(u,x-v);f=this.getPosition(C,
+H,e,k);C=f.x;H=f.y;D.style.left=C+"px";D.style.top=H+"px";D.style.width=e+"px";D.style.height=k+"px";!d&&c.clientHeight>D.clientHeight-v&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=H+14+"px",this.dialogImg.style.left=C+e+38-p+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=D;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,p,t,d,f,l,m){f=null!=f?f:!0;var q=document.createElement("div");q.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);q.appendChild(n)}c=
-document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=e;q.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!=m&&m()}),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()};q.appendChild(e);this.container=q},PrintDialog=function(b,c){this.create(b,c)};
-PrintDialog.prototype.create=function(b){function c(b){var f=d.checked||l.checked,c=parseInt(q.value)/100;isNaN(c)&&(c=1,q.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(m.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"));
+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 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()};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"));
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 q=document.createElement("input");q.setAttribute("value","100 %");q.setAttribute("size","5");q.style.width="50px";g.appendChild(q);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};
+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};
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=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 m=k.background;c();mxEvent.addListener(l,
-"click",function(d){b.pickColor(m||"none",function(b){m=b;c()});mxEvent.consume(d)});p.appendChild(l);mxUtils.write(p,mxResources.get("gridSize")+":");var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.style.width="40px";q.style.marginLeft="6px";q.value=k.getGridSize();p.appendChild(q);mxEvent.addListener(q,"change",function(){var b=parseInt(q.value);q.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(q.value);isNaN(d)||k.gridSize===d||k.setGridSize(d);d=new ChangePageSetup(b,m,v,f.get());d.ignoreColor=k.background==m;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||q!=document.activeElement&&n!=document.activeElement){b=!1;for(c=0;c<v.length;c++)l=v[c],H?"custom"==l.key&&(d.value=l.key,H=!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="",m.style.display="none"):(q.value=e.width/100,n.value=e.height/100,p.setAttribute("checked","checked"),
-d.value="custom",f.style.display="none",m.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 m=document.createElement("div");m.style.marginLeft=
-"4px";m.style.width="210px";m.style.height="24px";var q=document.createElement("input");q.setAttribute("size","7");q.style.textAlign="right";m.appendChild(q);mxUtils.write(m," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var u={},v=PageSetupDialog.getFormats(),y=0;y<v.length;y++){var x=v[y];u[x.key]=x;var C=document.createElement("option");C.setAttribute("value",
-x.key);mxUtils.write(C,x.title);d.appendChild(C)}var H=!1;g();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(m);var D=e,E=function(b,c){var l=u[d.value];null!=l.format?(q.value=l.format.width/100,n.value=l.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");l=parseFloat(q.value);if(isNaN(l)||0>=l)q.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(q.value)),
-Math.floor(100*parseFloat(n.value)));"custom"!=d.value&&t.checked&&(l=new mxRectangle(0,0,l.height,l.width));c&&H||l.width==D.width&&l.height==D.height||(D=l,null!=k&&k(D))};mxEvent.addListener(c,"click",function(b){p.checked=!0;E(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;E(b);mxEvent.consume(b)});mxEvent.addListener(q,"blur",E);mxEvent.addListener(q,"click",E);mxEvent.addListener(n,"blur",E);mxEvent.addListener(n,"click",E);mxEvent.addListener(t,"change",E);mxEvent.addListener(p,
-"change",E);mxEvent.addListener(d,"change",function(b){H="custom"==d.value;E(b,!0)});E();return{set:function(b){e=b;g(null,null,!0)},get:function(){return D},widthInput:q,heightInput:n}};
+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=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,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 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(q,"click",y);mxEvent.addListener(u,"click",y);e();n.appendChild(u);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,v,f.get());d.ignoreColor=k.background==m;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";
+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<v.length;c++)l=v[c],H?"custom"==l.key&&(d.value=l.key,H=!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 u={},v=PageSetupDialog.getFormats(),y=0;y<v.length;y++){var x=v[y];u[x.key]=x;var C=document.createElement("option");C.setAttribute("value",
+x.key);mxUtils.write(C,x.title);d.appendChild(C)}var H=!1;g();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(m);var D=e,E=function(b,c){var l=u[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&&H||l.width==D.width&&l.height==D.height||(D=l,null!=k&&k(D))};mxEvent.addListener(c,"click",function(b){n.checked=!0;E(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;E(b);mxEvent.consume(b)});mxEvent.addListener(p,"blur",E);mxEvent.addListener(p,"click",E);mxEvent.addListener(q,"blur",E);mxEvent.addListener(q,"click",E);mxEvent.addListener(t,"change",E);mxEvent.addListener(n,
+"change",E);mxEvent.addListener(d,"change",function(b){H="custom"==d.value;E(b,!0)});E();return{set:function(b){e=b;g(null,null,!0)},get:function(){return D},widthInput:p,heightInput:q}};
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,p,t,d,f,l,m,q){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!=q?q+"px":"180px";var C=mxUtils.button(e,function(){if(null==p||p(x.value))f&&b.hideDialog(),k(x.value)});C.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=
+var FilenameDialog=function(b,c,e,k,g,n,t,d,f,l,m,p){f=null!=f?f:!0;var q,u,v=document.createElement("table"),y=document.createElement("tbody");v.style.position="absolute";v.style.top="30px";v.style.left="20px";q=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"))+":");q.appendChild(u);var x=document.createElement("input");
+x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=p?p+"px":"180px";var C=mxUtils.button(e,function(){if(null==n||n(x.value))f&&b.hideDialog(),k(x.value)});C.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")),C.click());b.stopPropagation();
-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!=m&&(u.appendChild(FilenameDialog.createTypeHint(b,x,m)),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!=q?q-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!=m?"12px":"20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&u.appendChild(m);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",u.appendChild(q));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&C.click()});u.appendChild(C);b.editor.cancelFirst||u.appendChild(m);n.appendChild(u);y.appendChild(n);
+b.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(x);q.appendChild(u);if(null!=g||null==t)y.appendChild(q),null!=m&&(u.appendChild(FilenameDialog.createTypeHint(b,x,m)),null!=b.editor.diagramFileTypes&&(q=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")+":"),q.appendChild(u),
+u=document.createElement("td"),u.style.whiteSpace="nowrap",q.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!=p?p-40+"px":"190px",q.appendChild(u),y.appendChild(q)));null!=t&&(q=document.createElement("tr"),u=document.createElement("td"),u.colSpan=2,u.appendChild(t),q.appendChild(u),y.appendChild(q));q=document.createElement("tr");u=document.createElement("td");u.colSpan=2;u.style.paddingTop=
+null!=m?"12px":"20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&u.appendChild(m);null!=d&&(p=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),p.className="geBtn",u.appendChild(p));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&C.click()});u.appendChild(C);b.editor.cancelFirst||u.appendChild(m);q.appendChild(u);y.appendChild(q);
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)});
@@ -2119,25 +2120,25 @@ 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 l=this.gridSize*this.view.scale*this.view.gridSteps,l=-Math.round(l-mxUtils.mod(this.view.translate.x*this.view.scale+c,l))+"px "+-Math.round(l-mxUtils.mod(this.view.translate.y*this.view.scale+d,l))+"px";f.style.backgroundPosition=l}};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,C=p.x+d,H=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(C),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(H))];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 l=this.gridSize*this.view.scale*this.view.gridSteps,l=-Math.round(l-mxUtils.mod(this.view.translate.x*this.view.scale+c,l))+"px "+-Math.round(l-mxUtils.mod(this.view.translate.y*this.view.scale+d,l))+"px";f.style.backgroundPosition=l}};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 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,C=n.x+d,H=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)*v.height)),new mxPoint(Math.round(C),Math.round(n.y+(f+1)*v.height))]:[new mxPoint(Math.round(n.x+(f+1)*v.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(f+1)*v.width),Math.round(H))];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 l=0;l<d.length;l++){if(this.graph.isTableCell(d[l])||this.graph.isTableRow(d[l]))return!1;if(this.graph.getModel().isVertex(d[l])){var e=this.graph.getCellGeometry(d[l]);if(null!=e&&e.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 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.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.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);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=mxRectangle.fromRectangle(d);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 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 m=g[l],q=m.indexOf("=");if(0<=q){e=m.substring(0,q);var n=m.substring(q+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(ba){this.handleError(ba)}};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 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 F=0;F<b.length;F++)m=m.concat(f.getDescendants(b[F]));b=m}f.beginUpdate();try{for(F=0;F<b.length;F++){var q=b[F],n;if(d)n=["fontSize","fontFamily","fontColor"];else{var v=f.getStyle(q),A=null!=v?v.split(";"):[];n=p.slice();for(var u=0;u<A.length;u++){var J=A[u],x=J.indexOf("=");if(0<=x){var N=J.substring(0,x),y=mxUtils.indexOf(n,N);0<=y&&n.splice(y,1);for(m=0;m<l.length;m++){var D=l[m];if(0<=mxUtils.indexOf(D,N))for(var B=0;B<D.length;B++){var E=mxUtils.indexOf(n,D[B]);0<=E&&n.splice(E,
-1)}}}}}var Q=f.isEdge(q);m=Q?e:c;for(var C=f.getStyle(q),u=0;u<n.length;u++){var N=n[u],H=m[N];null!=H&&"edgeStyle"!=N&&("shape"!=N||Q)&&(!Q||g||0>mxUtils.indexOf(t,N))&&(C=mxUtils.setStyle(C,N,H))}Editor.simpleLabels&&(C=mxUtils.setStyle(mxUtils.setStyle(C,"html",null),"whiteSpace",null));f.setStyle(q,C)}}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 q=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=q,this.menubarContainer.onmousedown=q,this.toolbarContainer.onselectstart=q,this.toolbarContainer.onmousedown=q,this.diagramContainer.onselectstart=q,this.diagramContainer.onmousedown=q,this.sidebarContainer.onselectstart=q,this.sidebarContainer.onmousedown=
-q,this.formatContainer.onselectstart=q,this.formatContainer.onmousedown=q,this.footerContainer.onselectstart=q,this.footerContainer.onmousedown=q,null!=this.tabContainer&&(this.tabContainer.onselectstart=q));!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 q(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(){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 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 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(ba){this.handleError(ba)}};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 F=0;F<b.length;F++)m=m.concat(f.getDescendants(b[F]));b=m}f.beginUpdate();try{for(F=0;F<b.length;F++){var p=b[F],q;if(d)q=["fontSize","fontFamily","fontColor"];else{var v=f.getStyle(p),A=null!=v?v.split(";"):[];q=n.slice();for(var u=0;u<A.length;u++){var J=A[u],x=J.indexOf("=");if(0<=x){var y=J.substring(0,x),N=mxUtils.indexOf(q,y);0<=N&&q.splice(N,1);for(m=0;m<l.length;m++){var D=l[m];if(0<=mxUtils.indexOf(D,y))for(var B=0;B<D.length;B++){var E=mxUtils.indexOf(q,D[B]);0<=E&&q.splice(E,
+1)}}}}}var Q=f.isEdge(p);m=Q?e:c;for(var C=f.getStyle(p),u=0;u<q.length;u++){var y=q[u],H=m[y];null!=H&&"edgeStyle"!=y&&("shape"!=y||Q)&&(!Q||g||0>mxUtils.indexOf(t,y))&&(C=mxUtils.setStyle(C,y,H))}Editor.simpleLabels&&(C=mxUtils.setStyle(mxUtils.setStyle(C,"html",null),"whiteSpace",null));f.setStyle(p,C)}}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 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 C=k.isZoomWheelEvent;
@@ -2145,9 +2146,9 @@ k.isZoomWheelEvent=function(){return u||C.apply(this,arguments)};var H=!1,D=null
this.toolbar.fontMenu=D;this.toolbar.sizeMenu=E}H=k.cellEditor.isContentEditing();D=b;E=f;M=d}}),K=this,B=k.cellEditor.startEditing;k.cellEditor.startEditing=function(){B.apply(this,arguments);G();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 L=k.cellEditor.stopEditing;k.cellEditor.stopEditing=function(b,d){try{L.apply(this,arguments),G()}catch(Q){K.handleError(Q)}};k.container.setAttribute("tabindex","0");k.container.style.cursor="default";if(window.self===window.top&&null!=k.container.parentNode)try{k.container.focus()}catch(da){}var O=
k.fireMouseEvent;k.fireMouseEvent=function(b,d,f){b==mxEvent.MOUSE_DOWN&&this.container.focus();O.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"),q=c.getProperty("values"),
-m=0;m<e.length;m++){var n=0<=mxUtils.indexOf(d,e[m]);if("strokeColor"!=e[m]||null!=q[m]&&"none"!=q[m])if(0<=mxUtils.indexOf(t,e[m]))g||0<=mxUtils.indexOf(f,e[m])?null==q[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=q[m]:l&&0<=mxUtils.indexOf(p,e[m])&&(null==q[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=q[m]);else if(0<=mxUtils.indexOf(p,e[m])){if(l||n)null==q[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=q[m];if(g||n||0<=mxUtils.indexOf(f,e[m]))null==
-q[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=q[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));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||
"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());
@@ -2161,16 +2162,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 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,m){var k=b.getCompositeParent(d.cell);f=b.getCellGeometry(k);
+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,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&&
+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&&
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 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,m=this.editor.graph,f=document.createElement("div");g=m.view.getState(e);var q=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!=q&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(q,[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!=p&&p()})});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 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.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)]};
@@ -2185,27 +2186,27 @@ 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),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=
+0),q=0;q<l.length;q++){g.add(k,l[q]);var n=c.view.getState(e[q]);if(null!=n){var v=c.getCellGeometry(l[q]);null!=v&&v.relative&&!g.isEdge(e[q])&&null==f[mxObjectIdentity.get(g.getParent(e[q]))]&&(v.offset=null,v.relative=!1,v.x=n.x/n.view.scale-n.view.translate.x,v.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=
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,F=b.view.scale,k=mxRectangle.fromRectangle(l);
-k.x=k.x/F-m.x;k.y=k.y/F-m.y;k.width/=F;k.height/=F;var m=b.container.scrollTop,q=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/k.width)):F;f=(p-d*k.width)/2/d;var v=0==this.lightboxVerticalDivider?0:(n-d*k.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-
-k.x),Math.floor(v-k.y)),b.container.scrollTop=m*d/F,b.container.scrollLeft=q*d/F;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/F),Math.floor(l.y+e/F))}});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,
+k.x=k.x/F-m.x;k.y=k.y/F-m.y;k.width/=F;k.height/=F;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/k.width)):F;f=(n-d*k.width)/2/d;var v=0==this.lightboxVerticalDivider?0:(q-d*k.height)/this.lightboxVerticalDivider/d;g&&(f=Math.max(f,0),v=Math.max(v,0));if(g||l.width<n||l.height<q)b.view.scaleAndTranslate(d,Math.floor(f-
+k.x),Math.floor(v-k.y)),b.container.scrollTop=m*d/F,b.container.scrollLeft=p*d/F;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/F),Math.floor(l.y+e/F))}});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 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")),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 q=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",q);this.editor.addListener("pageSelected",m)}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,
+"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,u=null,v=mxUtils.bind(this,function(b){null!=q&&(window.clearTimeout(q),q=null);null!=u&&(window.clearTimeout(u),u=null);q=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);q=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!=q&&(window.clearTimeout(q),q=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=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,
"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")),C=b.getModel();C.addListener(mxEvent.CHANGE,function(){x.style.display=1<C.getChildCount(C.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(q=0;q<this.lightboxToolbarActions.length;q++){var H=this.lightboxToolbarActions[q];H.elem=p(H.fn,H.icon,H.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=
+Editor.layersImage,mxResources.get("layers")),C=b.getModel();C.addListener(mxEvent.CHANGE,function(){x.style.display=1<C.getChildCount(C.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 H=this.lightboxToolbarActions[p];H.elem=n(H.fn,H.icon,H.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),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 D=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)<D&&Math.abs(this.scrollTop-b.container.scrollTop)<D&&Math.abs(this.startX-f.getGraphX())<D&&Math.abs(this.startY-f.getGraphY())<D&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?v():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var E=
@@ -2233,7 +2234,7 @@ EditorUi.prototype.setScrollbars=function(b){var c=this.editor.graph,e=c.contain
EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph;if(!this.editor.extendCanvas)b.container.scrollTop=0,b.container.scrollLeft=0,mxUtils.hasScrollbars(b.container)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(b.container))if(b.pageVisible){var c=b.getPagePadding();b.container.scrollTop=Math.floor(c.y-this.editor.initialTopSpacing)-1;b.container.scrollLeft=Math.floor(Math.min(c.x,(b.container.scrollWidth-b.container.clientWidth)/2))-
1;c=b.getGraphBounds();0<c.width&&0<c.height&&(c.x>b.container.scrollLeft+.9*b.container.clientWidth&&(b.container.scrollLeft=Math.min(c.x+c.width-b.container.clientWidth,c.x-10)),c.y>b.container.scrollTop+.9*b.container.clientHeight&&(b.container.scrollTop=Math.min(c.y+c.height-b.container.clientHeight,c.y-10)))}else{var c=b.getGraphBounds(),e=Math.max(c.width,b.scrollTileSize.width*b.view.scale);b.container.scrollTop=Math.floor(Math.max(0,c.y-Math.max(20,(b.container.clientHeight-Math.max(c.height,
b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,c.x-Math.max(0,(b.container.clientWidth-e)/2)))}else{var c=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds()),e=b.view.translate,k=b.view.scale;c.x=c.x/k-e.x;c.y=c.y/k-e.y;c.width/=k;c.height/=k;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-c.width)/2)-c.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-c.height)/4))-c.y+1))}};
-EditorUi.prototype.setPageVisible=function(b){var c=this.editor.graph,e=mxUtils.hasScrollbars(c.container),k=0,g=0;e&&(k=c.view.translate.x*c.view.scale-c.container.scrollLeft,g=c.view.translate.y*c.view.scale-c.container.scrollTop);c.pageVisible=b;c.pageBreaksVisible=b;c.preferPageSize=b;c.view.validateBackground();if(e){var p=c.getSelectionCells();c.clearSelection();c.setSelectionCells(p)}c.sizeDidChange();e&&(c.container.scrollLeft=c.view.translate.x*c.view.scale-k,c.container.scrollTop=c.view.translate.y*
+EditorUi.prototype.setPageVisible=function(b){var c=this.editor.graph,e=mxUtils.hasScrollbars(c.container),k=0,g=0;e&&(k=c.view.translate.x*c.view.scale-c.container.scrollLeft,g=c.view.translate.y*c.view.scale-c.container.scrollTop);c.pageVisible=b;c.pageBreaksVisible=b;c.preferPageSize=b;c.view.validateBackground();if(e){var n=c.getSelectionCells();c.clearSelection();c.setSelectionCells(n)}c.sizeDidChange();e&&(c.container.scrollLeft=c.view.translate.x*c.view.scale-k,c.container.scrollTop=c.view.translate.y*
c.view.scale-g);c.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangeGridColor(b,c){this.ui=b;this.color=c}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
function ChangePageSetup(b,c,e,k,g){this.ui=b;this.previousColor=this.color=c;this.previousImage=this.image=e;this.previousFormat=this.format=k;this.previousPageScale=this.pageScale=g;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var c=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=c}if(!this.ignoreImage){this.image=this.previousImage;var c=b.backgroundImage,e=this.previousImage;null!=e&&null!=e.src&&"data:page/id,"==e.src.substring(0,13)&&(e=this.ui.createImageForPageLink(e.src,this.ui.currentPage));this.ui.setBackgroundImage(e);this.previousImage=c}null!=this.previousFormat&&
@@ -2242,19 +2243,19 @@ 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 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||
+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||
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==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};
+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};
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)),c=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",c+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",c+=this.toolbarHeight);0<c&&(c+=1);var p=0;if(null!=this.sidebarFooterContainer){var t=this.footerHeight+k,p=Math.max(0,Math.min(e-c-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=p+"px";
+20)),c=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",c+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",c+=this.toolbarHeight);0<c&&(c+=1);var n=0;if(null!=this.sidebarFooterContainer){var t=this.footerHeight+k,n=Math.max(0,Math.min(e-c-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=n+"px";
this.sidebarFooterContainer.style.bottom=t+"px"}e=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=c+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=c+"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.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");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+
-p+k+"px";this.formatContainer.style.bottom=this.footerHeight+k+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=d+t.x+"px",this.diagramContainer.style.top=c+t.y+"px",this.diagramContainer.style.right=e+"px",this.diagramContainer.style.bottom=this.footerHeight+k+g+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+n+k+"px";this.formatContainer.style.bottom=this.footerHeight+k+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=d+t.x+"px",this.diagramContainer.style.top=c+t.y+"px",this.diagramContainer.style.right=e+"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"));
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};
@@ -2263,13 +2264,13 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
!0,0,mxUtils.bind(this,function(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 p(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,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,m,q,n){b=new ErrorDialog(this,b,c,e||mxResources.get("ok"),k,g,p,t,q,d,f);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(b.container,l||340,m||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.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.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 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()};
+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()};
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")};
@@ -2285,15 +2286,15 @@ 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(),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.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.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,d,f){if(!k.isSelectionEmpty()&&k.isEnabled())if(d=null!=d?d:1,f){k.getModel().beginUpdate();try{var c=k.getSelectionCells();for(f=0;f<c.length;f++)if(k.getModel().isVertex(c[f])&&k.isCellResizable(c[f])){var e=k.getCellGeometry(c[f]);null!=e&&(e=e.clone(),37==b?e.width=Math.max(0,e.width-d):38==b?e.height=Math.max(0,e.height-d):39==b?e.width+=d:40==b&&(e.height+=d),k.getModel().setGeometry(c[f],e))}}finally{k.getModel().endUpdate()}}else{var c=
k.getSelectionCell(),e=k.model.getParent(c),l=k.getView().scale;f=null;1==k.getSelectionCount()&&k.model.isVertex(c)&&null!=k.layoutManager&&!k.isCellLocked(c)&&(f=k.layoutManager.getLayout(e));if(null!=f&&f.constructor==mxStackLayout)d=e.getIndex(c),37==b||38==b?k.model.add(e,c,Math.max(0,d-1)):39!=b&&40!=b||k.model.add(e,c,Math.min(k.model.getChildCount(e),d+1));else{var g=k.graphHandler;null!=g&&(null==g.first&&g.start(k.getSelectionCell(),0,0,k.getSelectionCells()),null!=g.first&&(e=c=0,37==b?
-c=-d:38==b?e=-d:39==b?c=d:40==b&&(e=d),g.currentDx+=c*l,g.currentDy+=e*l,g.checkPreview(),g.updatePreview()),null!=t&&window.clearTimeout(t),t=window.setTimeout(function(){if(null!=g.first){var b=g.roundLength(g.currentDx/l),d=g.roundLength(g.currentDy/l);g.moveCells(g.cells,b,d);g.reset()}},400))}}}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=null,d={37:mxConstants.DIRECTION_WEST,
+c=-d:38==b?e=-d:39==b?c=d:40==b&&(e=d),g.currentDx+=c*l,g.currentDy+=e*l,g.checkPreview(),g.updatePreview()),null!=t&&window.clearTimeout(t),t=window.setTimeout(function(){if(null!=g.first){var b=g.roundLength(g.currentDx/l),d=g.roundLength(g.currentDy/l);g.moveCells(g.cells,b,d);g.reset()}},400))}}}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=null,d={37:mxConstants.DIRECTION_WEST,
38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=g.getFunction;mxKeyHandler.prototype.getFunction=function(b){if(k.isEnabled()){if(mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){var l=e.actions.get(e.altShiftActions[b.keyCode]);if(null!=l)return l.funct}if(null!=d[b.keyCode]&&!k.isSelectionEmpty())if(!this.isControlDown(b)&&mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){if(k.model.isVertex(k.getSelectionCell()))return function(){var f=k.connectVertex(k.getSelectionCell(),
d[b.keyCode],k.defaultEdgeLength,b,!0);null!=f&&0<f.length&&(1==f.length&&k.model.isEdge(f[0])?k.setSelectionCell(k.model.getTerminal(f[0],!1)):k.setSelectionCell(f[f.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 f.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 l=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");
@@ -2311,23 +2312,23 @@ mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0"
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,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);
+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 q=this.selectionCellsHandler.getHandler(g.cell);null!=q&&null!=q.bends&&0<q.bends.length&&(l=q.getHandleForEvent(e))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(e.getEvent())&&(q=this.selectionCellsHandler.getHandler(g.cell),null==q||null==q.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),q=this.model.getParent(p);if(!this.isCellSelected(q)){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(q,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(q),this.selectCellForEvent(q,e.getEvent()),q=this.selectionCellsHandler.getHandler(q),null!=q&&(v=q.getHandleForEvent(e),null!=v&&(q.start(e.getGraphX(),e.getGraphY(),v),q.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)&&(q=this.getActualStartSize(g.cell),
-(0<q.x||0<q.width)&&mxUtils.intersects(n,new mxRectangle(g.x+(q.x-q.width-1)*k+(0==q.x?g.width:0),g.y,1,g.height))||(0<q.y||0<q.height)&&mxUtils.intersects(n,new mxRectangle(g.x,g.y+(q.y-q.height-1)*k+(0==q.y?g.height:0),g.width,1)))&&(this.selectCellForEvent(g.cell,e.getEvent()),q=this.selectionCellsHandler.getHandler(g.cell),null!=q&&(v=mxEvent.CUSTOM_HANDLE-q.customHandles.length+1,q.start(e.getGraphX(),e.getGraphY(),v),e.consume())),g=this.view.getState(this.model.getParent(g.cell))}}}));this.addMouseListener({mouseDown:function(b,
+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 v=this.getCellGeometry(g.cell),v=null!=v.alternateBounds?v.alternateBounds:v;if(mxUtils.intersects(q,new mxRectangle(g.x,g.y-2,v.width*k,3))&&this.model.getChildAt(p,0)!=n||mxUtils.intersects(q,new mxRectangle(g.x,g.y+v.height-2,v.width,3))||mxUtils.intersects(q,new mxRectangle(g.x-2,g.y,2,v.height*k))&&
+this.model.getChildAt(n,0)!=g.cell||mxUtils.intersects(q,new mxRectangle(g.x+v.width*k-2,g.y,2,v.height*k)))n=this.selectionCellsHandler.isHandled(p),this.selectCellForEvent(p,e.getEvent()),p=this.selectionCellsHandler.getHandler(p),null!=p&&(v=p.getHandleForEvent(e),null!=v&&(p.start(e.getGraphX(),e.getGraphY(),v),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&&(v=mxEvent.CUSTOM_HANDLE-p.customHandles.length+1,p.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 q=this.view.getEdgeStyle(e),n=q==mxEdgeStyle.EntityRelation;m||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==q&&null==g||q==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!=q&&(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==q?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),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),q=this.model.getParent(n),!this.isCellSelected(q)))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(q,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 q=this.getActualStartSize(n.cell),p=this.view.scale;(0<q.x||0<q.width)&&mxUtils.intersects(g,new mxRectangle(n.x+(q.x-q.width-1)*p+(0==q.x?n.width*p:0),n.y,1,n.height))?k="col-resize":(0<q.y||0<q.height)&&mxUtils.intersects(g,new mxRectangle(n.x,n.y+(q.y-q.height-1)*p+(0==q.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 q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var b=q.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])&&
+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(),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 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 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,C=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;C.apply(this,arguments);b!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var H=
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"))&&H.apply(this,arguments)};var D=this.isToggleEvent;this.isToggleEvent=function(b){return D.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};var E=v.isForceRubberbandEvent;v.isForceRubberbandEvent=function(b){return E.apply(this,
@@ -2347,13 +2348,13 @@ 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,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.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.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 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.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.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"!=urlParams.grid;Graph.prototype.lightbox=!1;
@@ -2365,7 +2366,7 @@ 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]],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()||
+(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()||
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)&&
"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);
@@ -2376,20 +2377,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(p){}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(n){}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 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};
+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};
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,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 m=g*l,q=1;q<p;q++)if(m<=k[q-1]){f.push(new mxPoint(e[q-1].x+(e[q].x-e[q-1].x)*m/k[q-1],e[q-1].y+(e[q].y-e[q-1].y)*m/k[q-1]));break}else m-=k[q-1],f.push(e[q]);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,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!=
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 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.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.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")};
@@ -2399,38 +2400,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,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"](),m=b[d+"Month"](),q=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:m+1,mm:t(m+1),mmm:k.i18n.monthNames[m],mmmm:k.i18n.monthNames[m+
-12],yy:String(q).slice(2),yyyy:q,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,
+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"](),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: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:u,MM:t(u),s:v,ss:t(v),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,
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),p=0;p<g;p++)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=
+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,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()};
+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.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,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),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 q=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!=q&&this.model.isVertex(q.cell)&&(l=q.x,n=q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(m.x+=b.parent.geometry.x,m.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(l+m.x*e,n+m.y*e)).grow(40*e);p=null!=p?
-this.getCells(0,0,0,0,null,null,p,null,!0):null;var q=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==q||null==x||mxUtils.intersects(q,x)||(v=p[y])}}var C=
+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),u=null,v=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==u||n[y]==this.model.getParent(b)))u=n[y];else if(null==v&&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)||(v=n[y])}}var C=
!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||g;C&&("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 H=[],D=v,v=u;g=mxUtils.bind(this,function(e){if(null==t||null!=e||null==v&&f){this.model.beginUpdate();try{if(null==D&&C){var g=this.getAbsoluteParent(null!=e?e:b),g=f?b:this.getCompositeParent(g);D=null!=e?e:this.duplicateCells([g],
-!1)[0];null!=e&&this.addCells([D],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(D);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!=u?(this.addCells([D],u,null,null,null,!0),v=null):C&&!f&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}var q=mxEvent.isControlDown(k)&&
-mxEvent.isShiftDown(k)&&C||null==v&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,D,this.createCurrentEdgeStyle());if(null!=q&&this.connectionHandler.insertBeforeSource){var n=null;for(e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=q.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==q.parent&&(n=e.parent.getIndex(e),this.model.add(e.parent,q,n))}null==v&&null!=D&&null!=b.parent&&f&&c==mxConstants.DIRECTION_WEST&&(n=b.parent.getIndex(b),this.model.add(b.parent,
-D,n));null!=q&&H.push(q);null==v&&null!=D&&H.push(D);null==D&&null!=q&&q.geometry.setTerminalPoint(m,!1);null!=q&&this.fireEvent(new mxEventObject("cellsInserted","cells",[q]))}finally{this.model.endUpdate()}}if(null!=d)d(H);else return H});if(null==t||null!=D||!C||null==v&&f)return g(D);t(l+m.x*e,n+m.y*e,g)};
+!1)[0];null!=e&&this.addCells([D],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(D);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!=u?(this.addCells([D],u,null,null,null,!0),v=null):C&&!f&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}var p=mxEvent.isControlDown(k)&&
+mxEvent.isShiftDown(k)&&C||null==v&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,D,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==v&&null!=D&&null!=b.parent&&f&&c==mxConstants.DIRECTION_WEST&&(q=b.parent.getIndex(b),this.model.add(b.parent,
+D,q));null!=p&&H.push(p);null==v&&null!=D&&H.push(D);null==D&&null!=p&&p.geometry.setTerminalPoint(m,!1);null!=p&&this.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{this.model.endUpdate()}}if(null!=d)d(H);else return H});if(null==t||null!=D||!C||null==v&&f)return g(D);t(l+m.x*e,q+m.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 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 m=this.model.getParent(e[p]),q=this.layoutManager.getLayout(m);
-null==q?null!=g&&this.isMoveCellsEvent(g,t)&&this.moveSiblings(t,m,f,l):null!=g&&mxEvent.isAltDown(g)||q.constructor!=mxStackLayout||q.resizeLast||this.resizeParentStacks(m,q,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.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.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 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.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.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};
@@ -2445,7 +2446,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 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,
+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,
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,
@@ -2455,93 +2456,93 @@ 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(),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.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.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 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")),
+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")),
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 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};
+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.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-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 m=this.getCellGeometry(p);null!=m&&(e||(e=b==t[t.length-1]),e&&(m=m.clone(),m.height+=c,k.setGeometry(p,m)));
-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),m=t[b],q=this.getCellGeometry(m);null!=q&&(q=q.clone(),q.width+=c,null!=q.alternateBounds&&(q.alternateBounds.width+=c),k.setGeometry(m,q));b<t.length-1&&(m=t[b+1],q=this.getCellGeometry(m),null!=q&&(q=q.clone(),
-q.x+=c,e||(q.width-=c,null!=q.alternateBounds&&(q.alternateBounds.width-=c)),k.setGeometry(m,q)))}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};
+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};
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),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 m=0;m<t.length;m++){var q=this.graph.getCellGeometry(t[m]);null!=q&&(q=q.clone(),q.y=b.y,q.height=e-b.y-b.height,null!=c?(q.x=c[m],q.width=c[m+1]-q.x,m==t.length-1&&m<c.length-2&&(q.width=k-q.x-b.x-b.width)):(q.x=f,f+=q.width,m==t.length-1?q.width=k-b.x-b.width-l:l+=q.width),q.alternateBounds=
-new mxRectangle(0,0,q.width,q.height),p.setGeometry(t[m],q));var n=!0,u=g[m];null!=u&&null!=u.geo&&null!=u.rowspan&&1<u.rowspan&&(u.geo.height+=null!=q.alternateBounds?q.alternateBounds.height:q.height,n=!1,u.rowspan--);null!=d&&null!=d.geo&&null!=d.colspan&&1<d.colspan&&(d.geo.width+=null!=q.alternateBounds?q.alternateBounds.width:q.width,n=!1,d.colspan--);p.setVisible(t[m],n);n=this.graph.getCurrentCellStyle(t[m],!0);q={style:n,cell:t[m],geo:q};if(null!=n){if(null==d||1>d.colspan)q.colspan=parseInt(n.colspan||
-0),d=q;null==u||1>u.rowspan?(q.rowspan=parseInt(n.rowspan||0),g[m]=q):null!=u&&(q.colspan=parseInt(u.style.colspan||0))}}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,m=t.getChildCells(b,!0),q=this.getSize(m,!1);if(0<f&&0<l&&0<m.length&&0<q){if(g){var n=this.graph.getCellGeometry(m[m.length-
-1]);null!=n&&(n=n.clone(),n.height=f-q+n.height,t.setGeometry(m[m.length-1],n))}for(var u=p?null:this.getRowLayout(m[0],l),v=[],y=c.y,x=0;x<m.length;x++)n=this.graph.getCellGeometry(m[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/q*f,n.height=Math.round(y)-n.y,t.setGeometry(m[x],n)),d=Math.max(d,this.layoutRow(m[x],u,n.height,l,v));k&&f<q&&(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+
+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,g){var n=this.graph.getModel(),t=n.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 m=0;m<t.length;m++){var p=this.graph.getCellGeometry(t[m]);null!=p&&(p=p.clone(),p.y=b.y,p.height=e-b.y-b.height,null!=c?(p.x=c[m],p.width=c[m+1]-p.x,m==t.length-1&&m<c.length-2&&(p.width=k-p.x-b.x-b.width)):(p.x=f,f+=p.width,m==t.length-1?p.width=k-b.x-b.width-l:l+=p.width),p.alternateBounds=
+new mxRectangle(0,0,p.width,p.height),n.setGeometry(t[m],p));var q=!0,u=g[m];null!=u&&null!=u.geo&&null!=u.rowspan&&1<u.rowspan&&(u.geo.height+=null!=p.alternateBounds?p.alternateBounds.height:p.height,q=!1,u.rowspan--);null!=d&&null!=d.geo&&null!=d.colspan&&1<d.colspan&&(d.geo.width+=null!=p.alternateBounds?p.alternateBounds.width:p.width,q=!1,d.colspan--);n.setVisible(t[m],q);q=this.graph.getCurrentCellStyle(t[m],!0);p={style:q,cell:t[m],geo:p};if(null!=q){if(null==d||1>d.colspan)p.colspan=parseInt(q.colspan||
+0),d=p;null==u||1>u.rowspan?(p.rowspan=parseInt(q.rowspan||0),g[m]=p):null!=u&&(p.colspan=parseInt(u.style.colspan||0))}}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"),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 u=n?null:this.getRowLayout(m[0],l),v=[],y=c.y,x=0;x<m.length;x++)q=this.graph.getCellGeometry(m[x]),null!=q&&(q=q.clone(),q.x=c.x,q.width=l,q.y=Math.round(y),y=g||k?y+q.height:y+q.height/p*f,q.height=Math.round(y)-q.y,t.setGeometry(m[x],q)),d=Math.max(d,this.layoutRow(m[x],u,q.height,l,v));k&&f<p&&(e=e.clone(),e.height=y+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()}}};
(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],p=[],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,M=0;M<this.validEdges.length;M++){var G=this.validEdges[M],K=G.absolutePoints;if(null!=K&&mxUtils.intersects(b,G)&&"1"!=G.style.noJump)for(G=0;G<K.length-1;G++){for(var B=K[G+1],L=K[G],t=K[G+2];G<K.length-2&&mxUtils.ptSegDistSq(L.x,L.y,t.x,t.y,B.x,B.y)<1*this.scale*this.scale;)B=
-t,G++,t=K[G+2];t=mxUtils.intersection(m.x,m.y,k.x,k.y,L.x,L.y,B.x,B.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-L.x)>g||Math.abs(t.y-L.y)>g)&&(Math.abs(t.x-B.x)>g||Math.abs(t.y-B.y)>g)){B=t.x-m.x;L=t.y-m.y;t={distSq:B*B+L*L,x:t.x,y:t.y};for(B=0;B<p.length;B++)if(p[B].distSq>t.distSq){p.splice(B,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(G=0;G<p.length;G++)f=e(1,p[G].x,
-p[G].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,m=null,q=[],n=null;b.begin();for(var t=0;t<this.state.routedPoints.length;t++){var G=this.state.routedPoints[t],K=new mxPoint(G.x/this.scale,G.y/this.scale);0==t?K=d[0]:t==this.state.routedPoints.length-1&&(K=d[d.length-1]);var B=!1;if(null!=k&&1==G.type){var L=this.state.routedPoints[t+1],G=L.x/this.scale-K.x,L=L.y/this.scale-K.y,G=G*G+L*L;null==n&&(n=new mxPoint(K.x-k.x,K.y-k.y),
-m=Math.sqrt(n.x*n.x+n.y*n.y),0<m?(n.x=n.x*e/m,n.y=n.y*e/m):n=null);G>e*e&&0<m&&(G=k.x-K.x,L=k.y-K.y,G=G*G+L*L,G>e*e&&(B=new mxPoint(K.x-n.x,K.y-n.y),G=new mxPoint(K.x+n.x,K.y+n.y),q.push(B),this.addPoints(b,q,f,c,!1,null,l),q=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,l=!1,"sharp"==g?(b.lineTo(B.x-n.y*q,B.y+n.x*q),b.lineTo(G.x-n.y*q,G.y+n.x*q),b.lineTo(G.x,G.y)):"line"==g?(b.moveTo(B.x+n.y*q,B.y-n.x*q),b.lineTo(B.x-n.y*q,B.y+n.x*q),b.moveTo(G.x-n.y*q,G.y+n.x*q),b.lineTo(G.x+n.y*
-q,G.y-n.x*q),b.moveTo(G.x,G.y)):"arc"==g?(q*=1.3,b.curveTo(B.x-n.y*q,B.y+n.x*q,G.x-n.y*q,G.y+n.x*q,G.x,G.y)):(b.moveTo(G.x,G.y),l=!0),q=[G],B=!0))}else n=null;B||(q.push(K),k=K)}this.addPoints(b,q,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 q=Math.cos(-k),n=Math.sin(-k),g=mxUtils.getRotatedPoint(g,q,n,m);q=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);q+=parseFloat(b.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(f,g,0==k&&l,q);0!=k&&(q=Math.cos(k),n=Math.sin(k),g=mxUtils.getRotatedPoint(g,q,n,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],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,M=0;M<this.validEdges.length;M++){var G=this.validEdges[M],K=G.absolutePoints;if(null!=K&&mxUtils.intersects(b,G)&&"1"!=G.style.noJump)for(G=0;G<K.length-1;G++){for(var B=K[G+1],L=K[G],t=K[G+2];G<K.length-2&&mxUtils.ptSegDistSq(L.x,L.y,t.x,t.y,B.x,B.y)<1*this.scale*this.scale;)B=
+t,G++,t=K[G+2];t=mxUtils.intersection(m.x,m.y,k.x,k.y,L.x,L.y,B.x,B.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-L.x)>g||Math.abs(t.y-L.y)>g)&&(Math.abs(t.x-B.x)>g||Math.abs(t.y-B.y)>g)){B=t.x-m.x;L=t.y-m.y;t={distSq:B*B+L*L,x:t.x,y:t.y};for(B=0;B<n.length;B++)if(n[B].distSq>t.distSq){n.splice(B,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(G=0;G<n.length;G++)f=e(1,n[G].x,
+n[G].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 G=this.state.routedPoints[t],K=new mxPoint(G.x/this.scale,G.y/this.scale);0==t?K=d[0]:t==this.state.routedPoints.length-1&&(K=d[d.length-1]);var B=!1;if(null!=k&&1==G.type){var L=this.state.routedPoints[t+1],G=L.x/this.scale-K.x,L=L.y/this.scale-K.y,G=G*G+L*L;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);G>e*e&&0<m&&(G=k.x-K.x,L=k.y-K.y,G=G*G+L*L,G>e*e&&(B=new mxPoint(K.x-q.x,K.y-q.y),G=new mxPoint(K.x+q.x,K.y+q.y),p.push(B),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(B.x-q.y*p,B.y+q.x*p),b.lineTo(G.x-q.y*p,G.y+q.x*p),b.lineTo(G.x,G.y)):"line"==g?(b.moveTo(B.x+q.y*p,B.y-q.x*p),b.lineTo(B.x-q.y*p,B.y+q.x*p),b.moveTo(G.x-q.y*p,G.y+q.x*p),b.lineTo(G.x+q.y*
+p,G.y-q.x*p),b.moveTo(G.x,G.y)):"arc"==g?(p*=1.3,b.curveTo(B.x-q.y*p,B.y+q.x*p,G.x-q.y*p,G.y+q.x*p,G.x,G.y)):(b.moveTo(G.x,G.y),l=!0),p=[G],B=!0))}else q=null;B||(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,
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(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 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};
+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};
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 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}}};
+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}}};
"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.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);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 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){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=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++)q=this.model.getChildren(this.moveCells([k[g]],d,f,!1,this.model.getRoot())[0]),null!=q&&(b=b.concat(q));else{var q=g.getChildren(k[0]);null!=
-q&&(b=this.moveCells(q,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 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 m=this.view.getState(b[e]);if(null!=m){var q=this.getCellGeometry(f[e]);null!=q&&q.relative&&!this.model.isEdge(b[e])&&null==c.get(this.model.getParent(b[e]))&&(q.offset=null,q.relative=!1,q.x=m.x/m.view.scale-m.view.translate.x,q.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=
+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 q=this.getChildCells(c,!0);for(d=0;d<q.length;d++){var n=this.getCellGeometry(q[d]);null!=n&&n.relative&&0<n.x&&this.model.remove(q[d])}var F=this.getChildCells(b,!0);for(d=0;d<F.length;d++)n=this.getCellGeometry(F[d]),null!=n&&n.relative&&
-0>=n.x&&this.model.remove(F[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 la=this.model.getTerminal(c,!1);if(null!=la){var v=this.getCurrentCellStyle(la);null!=v&&"1"==v.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[b]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,
+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 F=this.getChildCells(b,!0);for(d=0;d<F.length;d++)q=this.getCellGeometry(F[d]),null!=q&&q.relative&&
+0>=q.x&&this.model.remove(F[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 la=this.model.getTerminal(c,!1);if(null!=la){var v=this.getCurrentCellStyle(la);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 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=[],q=0;q<b.length;q++)this.isTable(b[q])?k=k.concat(this.model.getChildCells(b[q],!0).reverse()):k.push(b[q]);b=k}this.model.beginUpdate();try{k=[];for(q=0;q<
-b.length;q++)if(null!=e&&this.isTableRow(b[q])){var n=this.model.getParent(b[q]),F=this.getCellGeometry(b[q]);this.isTable(n)&&k.push(n);if(null!=n&&null!=F&&this.isTable(n)&&this.isTable(e)&&(c||n!=e)){if(!c){var v=this.getCellGeometry(n);null!=v&&(v=v.clone(),v.height-=F.height,this.model.setGeometry(n,v))}v=this.getCellGeometry(e);null!=v&&(v=v.clone(),v.height+=F.height,this.model.setGeometry(e,v));var la=this.model.getChildCells(e,!0);if(0<la.length){b[q]=c?this.cloneCell(b[q]):b[q];var u=this.model.getChildCells(b[q],
-!0),p=this.model.getChildCells(la[0],!0),A=p.length-u.length;if(0<A)for(var x=0;x<A;x++){var J=this.cloneCell(u[u.length-1]);null!=J&&(J.value="",this.model.add(b[q],J))}else if(0>A)for(x=0;x>A;x--)this.model.remove(u[u.length+x-1]);u=this.model.getChildCells(b[q],!0);for(x=0;x<p.length;x++){var P=this.getCellGeometry(p[x]),ta=this.getCellGeometry(u[x]);null!=P&&null!=ta&&(ta=ta.clone(),ta.width=P.width,this.model.setGeometry(u[x],ta))}}}}for(var t=m.apply(this,arguments),q=0;q<k.length;q++)!c&&this.model.contains(k[q])&&
-0==this.model.getChildCount(k[q])&&this.model.remove(k[q]);c&&this.updateCustomLinks(this.createCellMapping(l,this.createCellLookup(b)),t)}finally{this.model.endUpdate()}return t};var q=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=q.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=
+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]),F=this.getCellGeometry(b[p]);this.isTable(q)&&k.push(q);if(null!=q&&null!=F&&this.isTable(q)&&this.isTable(e)&&(c||q!=e)){if(!c){var v=this.getCellGeometry(q);null!=v&&(v=v.clone(),v.height-=F.height,this.model.setGeometry(q,v))}v=this.getCellGeometry(e);null!=v&&(v=v.clone(),v.height+=F.height,this.model.setGeometry(e,v));var la=this.model.getChildCells(e,!0);if(0<la.length){b[p]=c?this.cloneCell(b[p]):b[p];var u=this.model.getChildCells(b[p],
+!0),n=this.model.getChildCells(la[0],!0),A=n.length-u.length;if(0<A)for(var x=0;x<A;x++){var J=this.cloneCell(u[u.length-1]);null!=J&&(J.value="",this.model.add(b[p],J))}else if(0>A)for(x=0;x>A;x--)this.model.remove(u[u.length+x-1]);u=this.model.getChildCells(b[p],!0);for(x=0;x<n.length;x++){var P=this.getCellGeometry(n[x]),ta=this.getCellGeometry(u[x]);null!=P&&null!=ta&&(ta=ta.clone(),ta.width=P.width,this.model.setGeometry(u[x],ta))}}}}for(var t=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)),t)}finally{this.model.endUpdate()}return t};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=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(qa){}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)&&!this.isCellLocked(b)};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 q=m.getTerminalPoint(!0),n=m.getTerminalPoint(!1);m.setTerminalPoint(q,!1);m.setTerminalPoint(n,!0);f.setGeometry(g,
-m);var F=this.view.getState(g),v=this.view.getState(l),u=this.view.getState(k);if(null!=F){var p=null!=v?this.getConnectionConstraint(F,v,!0):null,la=null!=u?this.getConnectionConstraint(F,u,!1):null;this.setConnectionConstraint(g,l,!0,la);this.setConnectionConstraint(g,k,!1,p);var A=mxUtils.getValue(F.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(F.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[g]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-A,[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 x=m.width;m.width=m.height;m.height=x;f.setGeometry(g,m)}var J=this.view.getState(g);if(null!=J){var t=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],I=mxUtils.getValue(J.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 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=
+(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 F=this.view.getState(g),v=this.view.getState(l),u=this.view.getState(k);if(null!=F){var n=null!=v?this.getConnectionConstraint(F,v,!0):null,la=null!=u?this.getConnectionConstraint(F,u,!1):null;this.setConnectionConstraint(g,l,!0,la);this.setConnectionConstraint(g,k,!1,n);var A=mxUtils.getValue(F.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(F.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[g]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,
+A,[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 x=m.width;m.width=m.height;m.height=x;f.setGeometry(g,m)}var J=this.view.getState(g);if(null!=J){var t=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],y=mxUtils.getValue(J.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);
+this.setCellStyles(mxConstants.STYLE_DIRECTION,t[mxUtils.mod(mxUtils.indexOf(t,y)+(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&&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);
@@ -2563,31 +2564,31 @@ mouseMove:function(b,d){if(l.isMouseDown){if(null!=this.currentLink){var f=Math.
d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d))}},mouseUp:function(b,c){for(var e=c.getSource(),k=c.getEvent();null!=e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-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 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 F=
-q.getIndex(b[f]);c.add(q,m[f],F+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);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",m))}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"),
+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 F=
+p.getIndex(b[f]);c.add(p,m[f],F+1)}if(this.isTable(p)){var v=this.getCellGeometry(m[f]),u=this.getCellGeometry(p);null!=v&&null!=u&&(u=u.clone(),u.height+=v.height,c.setGeometry(p,u))}}else g.push(m[f])}this.updateCustomLinks(this.createCellMapping(l,k),m,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",m))}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 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};
+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,q,n,F,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 A="page"==v?this.view.getBackgroundPageBounds():g&&null==p||c||"diagram"==v?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),x=this.view.scale;"diagram"==v&&null!=this.backgroundImage&&(A=
+function(b,d,f,c,e,g,l,k,m,p,q,F,v,u){var n=null;if(null!=u)for(n=new mxDictionary,q=0;q<u.length;q++)n.put(u[q],!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 A="page"==v?this.view.getBackgroundPageBounds():g&&null==n||c||"diagram"==v?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),x=this.view.scale;"diagram"==v&&null!=this.backgroundImage&&(A=
mxRectangle.fromRectangle(A),A.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*x,(this.view.translate.y+this.backgroundImage.y)*x,this.backgroundImage.width*x,this.backgroundImage.height*x)));if(null==A)throw Error(mxResources.get("drawingEmpty"));var J=mxUtils.createXmlDocument(),t=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,"svg"):J.createElement("svg");null!=b&&(null!=t.style?t.style.backgroundColor=b:t.setAttribute("style","background-color:"+b));null==J.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/x;var I=Math.max(1,Math.ceil(A.width*b)+2*f)+(q?5:0),y=Math.max(1,Math.ceil(A.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);J.appendChild(t);var D=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,
-"g"):J.createElement("g");t.appendChild(D);var B=this.createSvgCanvas(D);B.foOffset=e?-.5:0;B.textOffset=e?-.5:0;B.imageOffset=e?-.5:0;B.translate(Math.floor(f/d-A.x/x),Math.floor(f/d-A.y/x));var aa=document.createElement("div"),la=B.getAlternateText;B.getAlternateText=function(b,d,f,c,e,g,l,k,m,q,n,z,ua){if(null!=g&&0<this.state.fontSize)try{mxUtils.isNode(g)?g=g.innerText:(aa.innerHTML=g,g=mxUtils.extractTextWithWhitespace(aa.childNodes));for(var Wa=Math.ceil(2*c/this.state.fontSize),ra=[],Ca=0,
+(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/x;var y=Math.max(1,Math.ceil(A.width*b)+2*f)+(p?5:0),I=Math.max(1,Math.ceil(A.height*b)+2*f)+(p?5:0);t.setAttribute("version","1.1");t.setAttribute("width",y+"px");t.setAttribute("height",I+"px");t.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+y+" "+I);J.appendChild(t);var D=null!=J.createElementNS?J.createElementNS(mxConstants.NS_SVG,
+"g"):J.createElement("g");t.appendChild(D);var B=this.createSvgCanvas(D);B.foOffset=e?-.5:0;B.textOffset=e?-.5:0;B.imageOffset=e?-.5:0;B.translate(Math.floor(f/d-A.x/x),Math.floor(f/d-A.y/x));var aa=document.createElement("div"),la=B.getAlternateText;B.getAlternateText=function(b,d,f,c,e,g,l,k,m,p,q,z,ua){if(null!=g&&0<this.state.fontSize)try{mxUtils.isNode(g)?g=g.innerText:(aa.innerHTML=g,g=mxUtils.extractTextWithWhitespace(aa.childNodes));for(var Wa=Math.ceil(2*c/this.state.fontSize),ra=[],Ca=0,
F=0;(0==Wa||Ca<Wa)&&F<g.length;){var Ua=g.charCodeAt(F);if(10==Ua||13==Ua){if(0<Ca)break}else ra.push(g.charAt(F)),255>Ua&&Ca++;F++}ra.length<g.length&&1<g.length-ra.length&&(g=mxUtils.trim(ra.join(""))+"...");return g}catch(gb){return la.apply(this,arguments)}else return la.apply(this,arguments)};var N=this.backgroundImage;if(null!=N){d=x/d;var P=this.view.translate,ta=new mxRectangle((N.x+P.x)*d,(N.y+P.y)*d,N.width*d,N.height*d);mxUtils.intersects(A,ta)&&B.image(N.x+P.x,N.y+P.y,N.width,N.height,
-N.src,!0)}B.scale(b);B.textEnabled=l;k=null!=k?k:this.createSvgImageExport();var ba=k.drawCellState,W=k.getLinkForCellState;k.getLinkForCellState=function(b,d){var f=W.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!=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)&&ba.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),B);this.updateSvgLinks(t,m,!0);this.addForeignObjectWarning(B,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",
+N.src,!0)}B.scale(b);B.textEnabled=l;k=null!=k?k:this.createSvgImageExport();var ba=k.drawCellState,W=k.getLinkForCellState;k.getLinkForCellState=function(b,d){var f=W.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!=n?n.get(b.cell):f.isCellSelected(b.cell),e=f.model.getParent(b.cell);!(g&&null==n||c)&&null!=e;)c=null!=n?
+n.get(e):f.isCellSelected(e),e=f.model.getParent(e);(g&&null==n||c)&&ba.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),B);this.updateSvgLinks(t,m,!0);this.addForeignObjectWarning(B,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&&(b=document.selection.createRange().parentElement());return b};Graph.prototype.getSelectedEditingElement=function(){for(var b=
this.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;null!=b&&b==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=this.cellEditor.textarea.firstChild);return b};Graph.prototype.getParentByName=function(b,d,f){for(;null!=b&&b.nodeName!=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],q=f.cloneCell(m,!1),n=this.getCellGeometry(q);q.value=null;if(null!=n){var k=n.width,F=this.getCellGeometry(l[g]);
-null!=F&&(n.height=F.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();
+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,F=this.getCellGeometry(l[g]);
+null!=F&&(q.height=F.height)}f.add(l[g],p,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 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()}};
+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);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);
@@ -2628,9 +2629,9 @@ b.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(b,d){return this.gr
var O=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return O.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 da=mxVertexHandler.prototype.isParentHighlightVisible;
mxVertexHandler.prototype.isParentHighlightVisible=function(){return da.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 Q=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return Q.apply(this,arguments).grow(-this.getSelectionBorderInset())};var X=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=X.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]),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 F=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==F?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+(q.width+
-F)*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){F=Math.max(Graph.minTableColumnWidth-q.width,d.x-b.x-q.width);v=mxEvent.isShiftDown(f.getEvent());null==n||v||(F=Math.min(F,n.width-Graph.minTableColumnWidth))};l.execute=function(b){if(0!=F)d.setTableColumnWidth(this.state.cell,F,v);
+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 F=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==F?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+(p.width+
+F)*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){F=Math.max(Graph.minTableColumnWidth-p.width,d.x-b.x-p.width);v=mxEvent.isShiftDown(f.getEvent());null==q||v||(F=Math.min(F,q.width-Graph.minTableColumnWidth))};l.execute=function(b){if(0!=F)d.setTableColumnWidth(this.state.cell,F,v);
else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}F=0};l.positionChanged=function(){};l.reset=function(){F=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 F=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){F.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=
@@ -2656,7 +2657,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]),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,
+(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,
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=
@@ -2685,33 +2686,33 @@ d=this.cornerHandles,f=d[0].bounds.height/2;d[0].bounds.x=this.state.x-d[0].boun
function(){S.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 ea=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
function(){if(null!=this.marker&&(ea.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 ha=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ha.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.visibility="")};var ia=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ia.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 m(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1}function q(){mxActor.call(this)}function n(){mxCylinder.call(this)}
+null!=this.linkHint&&(this.linkHint.style.visibility="")};var ia=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ia.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 u(){mxCylinder.call(this)}function v(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function C(){mxActor.call(this)}function H(){mxActor.call(this)}function D(){mxActor.call(this)}function E(){mxActor.call(this)}function M(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,M.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
this.canvas.moveTo=mxUtils.bind(this,M.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,M.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,M.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,M.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,M.prototype.arcTo)}function G(){mxRectangleShape.call(this)}function K(){mxRectangleShape.call(this)}
function B(){mxActor.call(this)}function L(){mxActor.call(this)}function O(){mxActor.call(this)}function da(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function Q(){mxCylinder.call(this)}function X(){mxShape.call(this)}function F(){mxShape.call(this)}function J(){mxEllipse.call(this)}function A(){mxShape.call(this)}function aa(){mxShape.call(this)}function I(){mxRectangleShape.call(this)}function W(){mxShape.call(this)}function ba(){mxShape.call(this)}function oa(){mxShape.call(this)}
function fa(){mxShape.call(this)}function ja(){mxShape.call(this)}function na(){mxCylinder.call(this)}function pa(){mxCylinder.call(this)}function ka(){mxRectangleShape.call(this)}function Y(){mxDoubleEllipse.call(this)}function Z(){mxDoubleEllipse.call(this)}function R(){mxArrowConnector.call(this);this.spacing=0}function sa(){mxArrowConnector.call(this);this.spacing=0}function U(){mxActor.call(this)}function T(){mxRectangleShape.call(this)}function ma(){mxActor.call(this)}function va(){mxActor.call(this)}
function S(){mxActor.call(this)}function ea(){mxActor.call(this)}function ha(){mxActor.call(this)}function ia(){mxActor.call(this)}function la(){mxActor.call(this)}function ta(){mxActor.call(this)}function P(){mxActor.call(this)}function ca(){mxActor.call(this)}function wa(){mxEllipse.call(this)}function ya(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}function za(){mxRhombus.call(this)}function Aa(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}
-function Ka(){mxEllipse.call(this)}function Ba(){mxActor.call(this)}function Ha(){mxActor.call(this)}function Fa(){mxActor.call(this)}function V(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 xa(){mxConnector.call(this)}function Oa(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,
+function Ka(){mxEllipse.call(this)}function Ba(){mxActor.call(this)}function Ha(){mxActor.call(this)}function Fa(){mxActor.call(this)}function V(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 xa(){mxConnector.call(this)}function Oa(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,
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"),ua="0"!=mxUtils.getValue(this.state.style,"columnLines","1"),m=z.getCellGeometry(l[0]),ra=z.model.getChildCells(l[0],!0),ra=[{y:null!=m?m.y+m.height:0,x:0,cells:ra,colspans:[]}];if(k)for(k=1;k<l.length;k++){var m=z.getCellGeometry(l[k]),q={y:0,cells:z.model.getChildCells(l[k],!0),colspans:[]};ra.push(q);if(null!=m){q.y=m.y+m.height;b.begin();b.moveTo(d+g.x,f+m.y);for(var n=0,Ca=
-0;Ca<q.cells.length;Ca++)z.model.isVisible(q.cells[Ca])?n=q.x:(0<n&&b.lineTo(d+n-g.width,f+m.y),b.moveTo(d+m.x+m.width+g.x,f+m.y),n=0);b.lineTo(d+c-g.width,f+m.y);b.end();b.stroke()}}if(ua)for(c=ra[0].cells,k=1;k<c.length;k++)if(m=z.getCellGeometry(c[k]),null!=m){b.begin();b.moveTo(d+m.x+g.x,f+g.y);for(var Ca=l=0;Ca<ra.length;Ca++)q=ra[Ca],ua=1==k?parseInt(z.getCurrentCellStyle(q.cells[k-1]).colspan||1):ra[Ca].colspans[k-1],q.colspans[k]=ua-1,1>q.colspans[k]?(q.colspans[k]=parseInt(z.getCurrentCellStyle(q.cells[k]).colspan||
-1),l=q.y):(0<l&&b.lineTo(d+m.x+g.x,f+l-g.height),b.moveTo(d+m.x+g.x,f+q.y),l=0);b.lineTo(d+m.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",
+l=z.model.getChildCells(this.state.cell,!0);if(0<l.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),ua="0"!=mxUtils.getValue(this.state.style,"columnLines","1"),m=z.getCellGeometry(l[0]),ra=z.model.getChildCells(l[0],!0),ra=[{y:null!=m?m.y+m.height:0,x:0,cells:ra,colspans:[]}];if(k)for(k=1;k<l.length;k++){var m=z.getCellGeometry(l[k]),p={y:0,cells:z.model.getChildCells(l[k],!0),colspans:[]};ra.push(p);if(null!=m){p.y=m.y+m.height;b.begin();b.moveTo(d+g.x,f+m.y);for(var q=0,Ca=
+0;Ca<p.cells.length;Ca++)z.model.isVisible(p.cells[Ca])?q=p.x:(0<q&&b.lineTo(d+q-g.width,f+m.y),b.moveTo(d+m.x+m.width+g.x,f+m.y),q=0);b.lineTo(d+c-g.width,f+m.y);b.end();b.stroke()}}if(ua)for(c=ra[0].cells,k=1;k<c.length;k++)if(m=z.getCellGeometry(c[k]),null!=m){b.begin();b.moveTo(d+m.x+g.x,f+g.y);for(var Ca=l=0;Ca<ra.length;Ca++)p=ra[Ca],ua=1==k?parseInt(z.getCurrentCellStyle(p.cells[k-1]).colspan||1):ra[Ca].colspans[k-1],p.colspans[k]=ua-1,1>p.colspans[k]?(p.colspans[k]=parseInt(z.getCurrentCellStyle(p.cells[k]).colspan||
+1),l=p.y):(0<l&&b.lineTo(d+m.x+g.x,f+l-g.height),b.moveTo(d+m.x+g.x,f+p.y),l=0);b.lineTo(d+m.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 La=Math.tan(mxUtils.toRadians(30)),
Ja=(.5-La)/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/La);b.translate((c-d)/2,(e-d)/2+d/4);b.moveTo(0,.25*d);b.lineTo(.5*d,d*Ja);b.lineTo(d,.25*d);b.lineTo(.5*d,(.5-Ja)*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+La));g?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ja)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ja)*d),b.lineTo(.5*d,(1-Ja)*d)):(b.translate((c-d)/2,(e-d)/2),b.moveTo(0,.25*
-d),b.lineTo(.5*d,d*Ja),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ja)*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=
+d),b.lineTo(.5*d,d*Ja),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ja)*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,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(q,mxActor);q.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",q);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,
+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))));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",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,
+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,"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(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,
@@ -2720,7 +2721,7 @@ function(){return!0};v.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Mat
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};n.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};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(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(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):
@@ -2745,8 +2746,8 @@ mxUtils.extend(O,mxHexagon);O.prototype.size=.25;O.prototype.fixedSize=20;O.prot
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",O);mxUtils.extend(da,mxRectangleShape);da.prototype.isHtmlAllowed=function(){return!1};da.prototype.paintForeground=function(b,d,f,c,e){var g=Math.min(c/5,e/5)+1;b.begin();b.moveTo(d+c/2,f+g);b.lineTo(d+c/2,f+e-g);b.moveTo(d+g,f+e/2);b.lineTo(d+c-g,f+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
mxCellRenderer.registerShape("plus",da);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 g=2*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&&(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"],q=this.style["symbol"+g+"Height"],n=this.style["symbol"+g+"Spacing"]||0,F=this.style["symbol"+g+"VSpacing"]||n,ua=
-this.style["symbol"+g+"ArcSpacing"];null!=ua&&(ua*=this.getArcSize(c+this.strokewidth,e+this.strokewidth),n+=ua,F+=ua);var ua=d,ra=f,ua=l==mxConstants.ALIGN_CENTER?ua+(c-m)/2:l==mxConstants.ALIGN_RIGHT?ua+(c-m-n):ua+n,ra=k==mxConstants.ALIGN_MIDDLE?ra+(e-q)/2:k==mxConstants.ALIGN_BOTTOM?ra+(e-q-F):ra+F;b.save();l=new z;l.style=this.style;z.prototype.paintVertexShape.call(l,b,ua,ra,m,q);b.restore()}g++}while(null!=z)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
+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,F=this.style["symbol"+g+"VSpacing"]||q,ua=
+this.style["symbol"+g+"ArcSpacing"];null!=ua&&(ua*=this.getArcSize(c+this.strokewidth,e+this.strokewidth),q+=ua,F+=ua);var ua=d,ra=f,ua=l==mxConstants.ALIGN_CENTER?ua+(c-m)/2:l==mxConstants.ALIGN_RIGHT?ua+(c-m-q):ua+q,ra=k==mxConstants.ALIGN_MIDDLE?ra+(e-p)/2:k==mxConstants.ALIGN_BOTTOM?ra+(e-p-F):ra+F;b.save();l=new z;l.style=this.style;z.prototype.paintVertexShape.call(l,b,ua,ra,m,p);b.restore()}g++}while(null!=z)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
N);mxUtils.extend(Q,mxCylinder);Q.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",Q);mxUtils.extend(X,mxShape);X.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",X);mxUtils.extend(F,mxShape);F.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};F.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",
F);mxUtils.extend(J,mxEllipse);J.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",J);mxUtils.extend(A,mxShape);A.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",A);mxUtils.extend(aa,mxShape);
@@ -2763,12 +2764,12 @@ d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?C.prototype.fixe
k,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]):(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,z),new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,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("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,
"fixedSize","0"),g=e?H.prototype.fixedSize:H.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?L.prototype.fixedSize:L.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!=
+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?L.prototype.fixedSize:L.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(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?O.prototype.fixedSize:O.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(ba,mxShape);ba.prototype.size=10;ba.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",ba);mxUtils.extend(oa,
+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?O.prototype.fixedSize:O.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(ba,mxShape);ba.prototype.size=10;ba.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",ba);mxUtils.extend(oa,
mxShape);oa.prototype.size=10;oa.prototype.inset=2;oa.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",oa);mxUtils.extend(fa,
mxShape);fa.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",fa);mxUtils.extend(ja,mxShape);ja.prototype.inset=2;ja.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",ja);mxUtils.extend(na,mxCylinder);na.prototype.jettyWidth=20;na.prototype.jettyHeight=10;na.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));f=l/2;var l=f+l/2,z=Math.min(d,e-d),k=Math.min(z+2*d,e-d);g?(b.moveTo(f,z),b.lineTo(l,z),b.lineTo(l,z+d),b.lineTo(f,z+d),b.moveTo(f,
@@ -2802,57 +2803,57 @@ defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enu
{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"}]}];V.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,
-f);this.strictDrawShape(b,0,0,c,e)};V.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)))),F=g&&g.dashed?g.dashed:mxUtils.getValue(this.style,"dashed",!1),z=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),A=g&&g.bottom?g.bottom:mxUtils.getValue(this.style,"bottom",!0),x=g&&g.left?g.left:mxUtils.getValue(this.style,
-"left",!0),J=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"),D=g&&g.fillColor?g.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");g&&g.strokeColor||mxUtils.getValue(this.style,
+f);this.strictDrawShape(b,0,0,c,e)};V.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)))),F=g&&g.dashed?g.dashed:mxUtils.getValue(this.style,"dashed",!1),z=g&&g.dashPattern?g.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),v=g&&g.relIndent?g.relIndent:Math.max(0,Math.min(50,q)),u=g&&g.top?g.top:mxUtils.getValue(this.style,"top",!0),n=g&&g.right?g.right:mxUtils.getValue(this.style,"right",!0),A=g&&g.bottom?g.bottom:mxUtils.getValue(this.style,"bottom",!0),x=g&&g.left?g.left:mxUtils.getValue(this.style,
+"left",!0),J=g&&g.topLeftStyle?g.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),t=g&&g.topRightStyle?g.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),y=g&&g.bottomRightStyle?g.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),I=g&&g.bottomLeftStyle?g.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),D=g&&g.fillColor?g.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");g&&g.strokeColor||mxUtils.getValue(this.style,
"strokeColor","#000000");var B=g&&g.strokeWidth?g.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),aa=g&&g.fillColor2?g.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),N=g&&g.gradientColor2?g.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),ra=g&&g.gradientDirection2?g.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),ba=g&&g.opacity?g.opacity:mxUtils.getValue(this.style,"opacity","100"),ua=Math.max(0,Math.min(50,m));g=V.prototype;
-b.setDashed(F);z&&""!=z&&b.setDashPattern(z);b.setStrokeWidth(B);m=Math.min(.5*e,.5*c,m);k||(m=ua*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||A||x)&&"frame"!=q&&(b.begin(),u?g.moveNW(b,d,f,c,e,l,J,m,x):b.moveTo(0,0),u&&g.paintNW(b,d,f,c,e,l,J,m,x),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,A),A&&g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,x),x&&g.paintSW(b,
-d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(aa),F=k=ba,"none"==aa&&(k=0),"none"==N&&(F=0),b.setGradient(aa,N,0,0,c,e,ra,k,F),b.begin(),u?g.moveNWInner(b,d,f,c,e,l,J,m,n,u,x):b.moveTo(n,0),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),x&&A&&g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),A&&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,J,m,n,x,u),u&&x&&g.paintNWInner(b,d,f,c,e,l,J,m,n),b.fill(),"none"==D&&(b.begin(),g.paintFolds(b,d,f,c,e,l,J,t,I,y,m,u,p,A,x),b.stroke()));u||p||A||!x?u||p||!A||x?!u&&!p&&A&&x?"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,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,J,m,n,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A)),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,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.lineNWInner(b,d,f,c,e,l,J,m,n,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),b.close(),b.fillAndStroke()):u||!p||A||x?!u&&p&&!A&&x?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,J,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,J,m,n,u,x),g.paintLeftInner(b,d,f,c,e,l,
-y,m,n,A,x)),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,A),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,I,m,n,A),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,J,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.lineNWInner(b,d,f,c,e,l,J,m,n,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),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,A),g.lineSEInner(b,d,f,c,e,l,I,m,n,A),g.paintRightInner(b,d,f,c,
-e,l,t,m,n,u,p),b.close(),b.fillAndStroke()):!u&&p&&A&&!x?"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,A),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,x),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,x),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),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,A),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,
-e,l,y,m,x),g.lineSWInner(b,d,f,c,e,l,y,m,n,x),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),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&&A&&x?"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,A),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,J,m,n,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),g.paintSWInner(b,
-d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),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,A),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.lineNWInner(b,d,f,c,e,l,J,m,n,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),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||A||x?u&&!p&&!A&&x?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),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,J,m,n,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,
-d,f,c,e,l,J,m,x),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,J,m,n,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),b.close(),b.fillAndStroke()):u&&!p&&A&&!x?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),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,J,m,n,x,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,x),"double"==q&&
-(g.moveSWInner(b,d,f,c,e,l,y,m,n,x),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),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,J,m,n,x,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,x),g.lineSWInner(b,d,f,c,e,l,y,m,n,x),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),b.close(),b.fillAndStroke()):u&&!p&&A&&x?"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,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),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,J,m,n,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A)),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,x),g.paintSW(b,d,f,c,e,l,y,
-m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),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,J,m,n,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),b.close(),b.fillAndStroke()):u&&p&&!A&&!x?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),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,
-A),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,I,m,n,A),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,J,m,n,x,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),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,A),g.lineSEInner(b,d,f,c,e,l,I,m,n,A),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,J,m,n,x,u),b.close(),b.fillAndStroke()):u&&p&&!A&&x?"frame"!=
-q?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),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,A),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,I,m,n,A),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,J,m,n,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,
-e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),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,A),g.lineSEInner(b,d,f,c,e,l,I,m,n,A),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,J,m,n,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),b.close(),b.fillAndStroke()):u&&p&&A&&!x?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),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,A),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,x),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,x),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),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,J,m,n,x,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),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,A),g.paintSE(b,d,f,c,e,l,
-I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,x),g.lineSWInner(b,d,f,c,e,l,y,m,n,x),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),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,J,m,n,x,u),b.close(),b.fillAndStroke()):u&&p&&A&&x&&("frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintNW(b,d,f,c,e,l,J,m,x),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,A),g.paintSE(b,d,f,c,e,l,I,
-m,p),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),b.close(),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,x),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),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,J,m,n,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),b.close()),b.stroke()):(b.begin(),g.moveNW(b,
-d,f,c,e,l,J,m,x),g.paintNW(b,d,f,c,e,l,J,m,x),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,A),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,x),g.paintSW(b,d,f,c,e,l,y,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),b.close(),g.moveSWInner(b,d,f,c,e,l,y,m,n,x),g.paintSWInner(b,d,f,c,e,l,y,m,n,A),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),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,J,m,n,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x),b.close(),b.fillAndStroke())):"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),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,J,m,n,x,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),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,J,m,n,x,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,A),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,I,m,n,A),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,A),g.lineSEInner(b,d,f,c,e,l,I,m,n,A),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,x),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,x),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A)),
-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,x),g.lineSWInner(b,d,f,c,e,l,y,m,n,x),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,A),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,J,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,J,m,n,u,x),g.paintLeftInner(b,d,f,c,e,l,y,m,n,A,x)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,J,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.lineNWInner(b,d,f,c,e,l,J,m,n,u,x),g.paintLeftInner(b,
-d,f,c,e,l,y,m,n,A,x),b.close(),b.fillAndStroke());b.begin();g.paintFolds(b,d,f,c,e,l,J,t,I,y,m,u,p,A,x);b.stroke()};V.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)};V.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)};V.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)};V.prototype.moveSW=function(b,
+b.setDashed(F);z&&""!=z&&b.setDashPattern(z);b.setStrokeWidth(B);m=Math.min(.5*e,.5*c,m);k||(m=ua*Math.min(c,e)/100);m=Math.min(m,.5*Math.min(c,e));k||(q=Math.min(v*Math.min(c,e)/100));q=Math.min(q,.5*Math.min(c,e)-m);(u||n||A||x)&&"frame"!=p&&(b.begin(),u?g.moveNW(b,d,f,c,e,l,J,m,x):b.moveTo(0,0),u&&g.paintNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),n&&g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),A&&g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),x&&g.paintSW(b,
+d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(aa),F=k=ba,"none"==aa&&(k=0),"none"==N&&(F=0),b.setGradient(aa,N,0,0,c,e,ra,k,F),b.begin(),u?g.moveNWInner(b,d,f,c,e,l,J,m,q,u,x):b.moveTo(q,0),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),x&&A&&g.paintSWInner(b,d,f,c,e,l,I,m,q,A),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),A&&n&&g.paintSEInner(b,d,f,c,e,l,y,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),n&&u&&g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,
+d,f,c,e,l,J,m,q,x,u),u&&x&&g.paintNWInner(b,d,f,c,e,l,J,m,q),b.fill(),"none"==D&&(b.begin(),g.paintFolds(b,d,f,c,e,l,J,t,y,I,m,u,n,A,x),b.stroke()));u||n||A||!x?u||n||!A||x?!u&&!n&&A&&x?"frame"!=p?(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.paintSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),"double"==p&&(g.moveNWInner(b,d,f,c,e,l,J,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),g.paintSWInner(b,d,f,c,e,l,I,m,q,A),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A)),b.stroke()):
+(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.paintSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.lineNWInner(b,d,f,c,e,l,J,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),g.paintSWInner(b,d,f,c,e,l,I,m,q,A),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),b.close(),b.fillAndStroke()):u||!n||A||x?!u&&n&&!A&&x?"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,J,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),"double"==p&&(g.moveNWInner(b,d,f,c,e,l,J,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,
+I,m,q,A,x)),b.stroke(),b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,y,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,J,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.lineNWInner(b,d,f,c,e,l,J,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),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,y,m,A),g.lineSEInner(b,d,f,c,e,l,y,m,q,A),g.paintRightInner(b,d,f,c,
+e,l,t,m,q,u,n),b.close(),b.fillAndStroke()):!u&&n&&A&&!x?"frame"!=p?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,I,m,q,x),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,y,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,
+e,l,I,m,x),g.lineSWInner(b,d,f,c,e,l,I,m,q,x),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,y,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),b.close(),b.fillAndStroke()):!u&&n&&A&&x?"frame"!=p?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.paintSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),"double"==p&&(g.moveNWInner(b,d,f,c,e,l,J,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),g.paintSWInner(b,
+d,f,c,e,l,I,m,q,A),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,y,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.paintSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.lineNWInner(b,d,f,c,e,l,J,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),g.paintSWInner(b,d,f,c,e,l,I,m,q,A),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),g.paintSEInner(b,
+d,f,c,e,l,y,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),b.close(),b.fillAndStroke()):!u||n||A||x?u&&!n&&!A&&x?"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,q),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,
+d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,q),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),b.close(),b.fillAndStroke()):u&&!n&&A&&!x?"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u)),b.stroke(),b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),"double"==p&&
+(g.moveSWInner(b,d,f,c,e,l,I,m,q,x),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),b.close(),b.fillAndStroke(),b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.lineSWInner(b,d,f,c,e,l,I,m,q,x),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),b.close(),b.fillAndStroke()):u&&!n&&A&&x?"frame"!=p?(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),
+g.paintBottom(b,d,f,c,e,l,I,m,x),g.paintSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,q),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),g.paintSWInner(b,d,f,c,e,l,I,m,q,A),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.paintSW(b,d,f,c,e,l,I,
+m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,q),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),g.paintSWInner(b,d,f,c,e,l,I,m,q,A),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),b.close(),b.fillAndStroke()):u&&n&&!A&&!x?"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,
+A),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,y,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.lineSEInner(b,d,f,c,e,l,y,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),b.close(),b.fillAndStroke()):u&&n&&!A&&x?"frame"!=
+p?(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,y,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,q),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,
+e,l,J,m,u),g.paintNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.lineSEInner(b,d,f,c,e,l,y,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,q),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),b.close(),b.fillAndStroke()):u&&n&&A&&!x?"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,
+u),g.paintRight(b,d,f,c,e,l,y,m,A),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,I,m,q,x),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,y,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.paintSE(b,d,f,c,e,l,
+y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.lineSWInner(b,d,f,c,e,l,I,m,q,x),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,y,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),b.close(),b.fillAndStroke()):u&&n&&A&&x&&("frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.paintSE(b,d,f,c,e,l,y,
+m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.paintSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),b.close(),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,I,m,q,x),g.paintSWInner(b,d,f,c,e,l,I,m,q,A),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,y,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,q),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),b.close()),b.stroke()):(b.begin(),g.moveNW(b,
+d,f,c,e,l,J,m,x),g.paintNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.paintSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.paintSW(b,d,f,c,e,l,I,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),b.close(),g.moveSWInner(b,d,f,c,e,l,I,m,q,x),g.paintSWInner(b,d,f,c,e,l,I,m,q,A),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),g.paintSEInner(b,d,f,c,e,l,y,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,
+d,f,c,e,l,J,m,q,x,u),g.paintNWInner(b,d,f,c,e,l,J,m,q),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x),b.close(),b.fillAndStroke())):"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,J,m,x),g.paintTop(b,d,f,c,e,l,t,m,n),g.lineNEInner(b,d,f,c,e,l,t,m,q,n),g.paintTopInner(b,d,f,c,e,l,J,m,q,x,u),b.close(),b.fillAndStroke()):"frame"!=p?(b.begin(),g.moveNE(b,
+d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,y,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,y,m,A),g.lineSEInner(b,d,f,c,e,l,y,m,q,A),g.paintRightInner(b,d,f,c,e,l,t,m,q,u,n),b.close(),b.fillAndStroke()):"frame"!=p?(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,I,m,q,x),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A)),
+b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,y,m,n),g.paintBottom(b,d,f,c,e,l,I,m,x),g.lineSWInner(b,d,f,c,e,l,I,m,q,x),g.paintBottomInner(b,d,f,c,e,l,y,m,q,n,A),b.close(),b.fillAndStroke()):"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,J,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),"double"==p&&(g.moveNWInner(b,d,f,c,e,l,J,m,q,u,x),g.paintLeftInner(b,d,f,c,e,l,I,m,q,A,x)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,J,m,A),g.paintLeft(b,d,f,c,e,l,J,m,u),g.lineNWInner(b,d,f,c,e,l,J,m,q,u,x),g.paintLeftInner(b,
+d,f,c,e,l,I,m,q,A,x),b.close(),b.fillAndStroke());b.begin();g.paintFolds(b,d,f,c,e,l,J,t,y,I,m,u,n,A,x);b.stroke()};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.prototype.paintRightInner=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)};V.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)};V.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)};V.prototype.paintBottomInner=function(b,d,f,c,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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.prototype.paintFolds=function(b,d,f,c,e,g,l,m,k,n,q,F,u,p,A){if("fold"==g||"fold"==l||"fold"==m||"fold"==k||"fold"==n)("fold"==l||"default"==l&&"fold"==g)&&F&&A&&(b.moveTo(0,q),b.lineTo(q,q),
-b.lineTo(q,0)),("fold"==m||"default"==m&&"fold"==g)&&F&&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&&A&&(b.moveTo(0,e-q),b.lineTo(q,e-q),b.lineTo(q,e))};mxCellRenderer.registerShape(V.prototype.cst.RECT2,V);V.prototype.constraints=null;mxUtils.extend(xa,mxConnector);xa.prototype.origPaintEdgeShape=xa.prototype.paintEdgeShape;xa.prototype.paintEdgeShape=function(b,
+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)};V.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&&"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)};V.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)};V.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)};V.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"==l&&"snip"==g?b.lineTo(k,e-m-.5*k):b.lineTo(k,e-m-k):b.lineTo(k,e):b.lineTo(0,
+e)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.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)};V.prototype.paintFolds=function(b,d,f,c,e,g,l,m,k,q,p,F,u,n,A){if("fold"==g||"fold"==l||"fold"==m||"fold"==k||"fold"==q)("fold"==l||"default"==l&&"fold"==g)&&F&&A&&(b.moveTo(0,p),b.lineTo(p,p),
+b.lineTo(p,0)),("fold"==m||"default"==m&&"fold"==g)&&F&&u&&(b.moveTo(c-p,0),b.lineTo(c-p,p),b.lineTo(c,p)),("fold"==k||"default"==k&&"fold"==g)&&n&&u&&(b.moveTo(c-p,e),b.lineTo(c-p,e-p),b.lineTo(c,e-p)),("fold"==q||"default"==q&&"fold"==g)&&n&&A&&(b.moveTo(0,e-p),b.lineTo(p,e-p),b.lineTo(p,e))};mxCellRenderer.registerShape(V.prototype.cst.RECT2,V);V.prototype.constraints=null;mxUtils.extend(xa,mxConnector);xa.prototype.origPaintEdgeShape=xa.prototype.paintEdgeShape;xa.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;xa.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),xa.prototype.origPaintEdgeShape.apply(this,[b,d,f])))};mxCellRenderer.registerShape("filledEdge",xa);"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,n){var q=e*(l+k+1),F=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-q/2-F/2,c.y-F/2+q/2);b.lineTo(c.x+F/2-3*q/2,c.y-3*F/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),F=g*(l+k+1),u=c.x+q/2,p=c.y+F/2;c.x-=q;c.y-=F;return function(){b.begin();b.moveTo(u-q/2-F/2,p-F/2+q/2);b.lineTo(u-q/2+F/2,p-F/2-q/2);b.lineTo(u+F/2-3*q/2,p-3*F/2-q/2);b.lineTo(u-F/2-3*q/2,p-3*F/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),F=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-q/2-F/2,c.y-F/2+q/2);b.lineTo(c.x+F/2-3*q/2,c.y-3*F/2-q/2);b.moveTo(c.x-q/2+F/2,c.y-F/2-q/2);b.lineTo(c.x-F/2-3*q/2,c.y-
-3*F/2+q/2);b.stroke()}});mxMarker.addMarker("circle",Oa);mxMarker.addMarker("circlePlus",function(b,d,f,c,e,g,l,m,k,n){var q=c.clone(),F=Oa.apply(this,arguments),u=e*(l+2*k),p=g*(l+2*k);return function(){F.apply(this,arguments);b.begin();b.moveTo(q.x-e*k,q.y-g*k);b.lineTo(q.x-2*u+e*k,q.y-2*p+g*k);b.moveTo(q.x-u-p+g*k,q.y-p+u-e*k);b.lineTo(q.x+p-u-g*k,q.y-p-u+e*k);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,f,c,e,g,l,m,k,q){var n=e*(l+k+1),F=g*(l+k+1),u=c.clone();c.x-=n;c.y-=F;return function(){b.begin();
-b.moveTo(u.x-F,u.y+n);b.quadTo(c.x-F,c.y+n,c.x,c.y);b.quadTo(c.x+F,c.y-n,u.x+F,u.y-n);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 F=e.clone();return function(){d.begin();d.moveTo(F.x,F.y);k?d.lineTo(F.x-g-l/b,F.y-l+g/b):d.lineTo(F.x+l/b-g,F.y-l-g/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(b,d,f){return Na(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})},Na=
-function(b,d,f,c,e){return ga(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,F=Math.sqrt(m*m+q*q);c.x=(c.x+d.x)*k;c.y=(c.y+d.y)*k;e.call(this,F,m/F,q/F,n,l,c,g)})},Ia=function(b){return function(d){return[ga(d,
+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),F=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-p/2-F/2,c.y-F/2+p/2);b.lineTo(c.x+F/2-3*p/2,c.y-3*F/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),F=g*(l+k+1),u=c.x+p/2,n=c.y+F/2;c.x-=p;c.y-=F;return function(){b.begin();b.moveTo(u-p/2-F/2,n-F/2+p/2);b.lineTo(u-p/2+F/2,n-F/2-p/2);b.lineTo(u+F/2-3*p/2,n-3*F/2-p/2);b.lineTo(u-F/2-3*p/2,n-3*F/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),F=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-p/2-F/2,c.y-F/2+p/2);b.lineTo(c.x+F/2-3*p/2,c.y-3*F/2-p/2);b.moveTo(c.x-p/2+F/2,c.y-F/2-p/2);b.lineTo(c.x-F/2-3*p/2,c.y-
+3*F/2+p/2);b.stroke()}});mxMarker.addMarker("circle",Oa);mxMarker.addMarker("circlePlus",function(b,d,f,c,e,g,l,m,k,q){var p=c.clone(),F=Oa.apply(this,arguments),u=e*(l+2*k),n=g*(l+2*k);return function(){F.apply(this,arguments);b.begin();b.moveTo(p.x-e*k,p.y-g*k);b.lineTo(p.x-2*u+e*k,p.y-2*n+g*k);b.moveTo(p.x-u-n+g*k,p.y-n+u-e*k);b.lineTo(p.x+n-u-g*k,p.y-n-u+e*k);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,f,c,e,g,l,m,k,p){var q=e*(l+k+1),F=g*(l+k+1),u=c.clone();c.x-=q;c.y-=F;return function(){b.begin();
+b.moveTo(u.x-F,u.y+q);b.quadTo(c.x-F,c.y+q,c.x,c.y);b.quadTo(c.x+F,c.y-q,u.x+F,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 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 F=e.clone();return function(){d.begin();d.moveTo(F.x,F.y);k?d.lineTo(F.x-g-l/b,F.y-l+g/b):d.lineTo(F.x+l/b-g,F.y-l-g/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(b,d,f){return Na(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})},Na=
+function(b,d,f,c,e){return ga(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,F=Math.sqrt(m*m+q*q);c.x=(c.x+d.x)*k;c.y=(c.y+d.y)*k;e.call(this,F,m/F,q/F,p,l,c,g)})},Ia=function(b){return function(d){return[ga(d,
["arrowWidth","arrowSize"],function(d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ea.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",ea.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[ga(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)]}},Ta=function(b,d,f){return function(c){var e=[ga(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(Ga(c));return e}},Pa=function(b,d,f,c,e){f=null!=f?f:.5;return function(g){var l=[ga(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,
@@ -2885,8 +2886,8 @@ this.state.style.base=Math.round(Math.max(0,Math.min(b.width,d.x-b.x-f*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(Ga(b));return d},module:function(b){return[ga(b,["jettyWidth","jettyHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"jettyWidth",na.prototype.jettyWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"jettyHeight",na.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[ga(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",ma.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",ma.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[ga(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",S.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",S.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:Ia(1),doubleArrow:Ia(.5),folder:function(b){return[ga(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[ga(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,
+Math.min(b.height,d.y-b.y)))},!1)]},singleArrow:Ia(1),doubleArrow:Ia(.5),folder:function(b){return[ga(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[ga(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[ga(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[ga(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[ga(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ca.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,
@@ -2894,7 +2895,7 @@ Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},"mxgraph.basic.rect":
H.prototype.size,H.prototype.fixedSize),parallelogram:Va(1,C.prototype.size,C.prototype.fixedSize)};Graph.createHandle=ga;Graph.handleFactory=Qa;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=Qa[d];null==d&&null!=this.state.shape&&this.state.shape.isRoundable()&&(d=Qa[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=Qa[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory=
{};var Ra=new mxPoint(1,0),Sa=new mxPoint(1,0),Ia=mxUtils.toRadians(-30),Ra=mxUtils.getRotatedPoint(Ra,Math.cos(Ia),Math.sin(Ia)),Ia=mxUtils.toRadians(-150),Sa=mxUtils.getRotatedPoint(Sa,Math.cos(Ia),Math.sin(Ia));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=Ra.x,n=Ra.y,q=Sa.x,F=Sa.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=(F*b-q*c)/(k*F-n*q);b=(n*b-k*c)/(n*q-k*F);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+F*b)):(f&&(p=new mxPoint(p.x+q*b,p.y+F*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",
+f.getCenterY()));var k=Ra.x,p=Ra.y,q=Sa.x,F=Sa.y,u="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=l&&null!=m){b=function(b,d,f){b-=n.x;var c=d-n.y;d=(F*b-q*c)/(k*F-p*q);b=(p*b-k*c)/(p*q-k*F);u?(f&&(n=new mxPoint(n.x+k*d,n.y+p*d),e.push(n)),n=new mxPoint(n.x+q*b,n.y+F*b)):(f&&(n=new mxPoint(n.x+q*b,n.y+F*b),e.push(n)),n=new mxPoint(n.x+k*d,n.y+p*d));e.push(n)};var n=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,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
@@ -2910,7 +2911,7 @@ null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.
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,.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};n.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,
+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=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,0),!1,null,0,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2923,7 +2924,7 @@ d),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(
.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)];X.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,.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)];q.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,
+.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,.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)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.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)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
@@ -2946,14 +2947,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;la.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)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();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,p=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,n=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(q){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+q.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(),
+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(),
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(q){}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(p){}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)||
@@ -2966,13 +2967,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=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,
+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,
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=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 k=b.getElementsByTagName("a"),
-n=0;n<k.length&&null==d;n++)k[n].textContent==b.textContent&&(d=k[n]);null!=d&&"A"==d.nodeName&&(c=d.getAttribute("href")||"",g.selectNode(d));var u=g.cellEditor.saveSelection();e.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(b){g.cellEditor.restoreSelection(u);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();
+!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 u=g.cellEditor.saveSelection();e.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(b){g.cellEditor.restoreSelection(u);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 n=g.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(n=n.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var u=document.createElement("div");u.innerHTML=g.sanitizeHtml(n);n=mxUtils.extractTextWithWhitespace(u.childNodes);g.cellLabelChanged(state.cell,n);g.setCellStyles("html",b,[d[c]])}else"0"==k&&"1"==b&&(n=mxUtils.htmlEntities(g.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
-"1")&&(n=n.replace(/\n/g,"<br/>")),g.cellLabelChanged(state.cell,g.sanitizeHtml(n)),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",
+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 u=document.createElement("div");u.innerHTML=g.sanitizeHtml(q);q=mxUtils.extractTextWithWhitespace(u.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",
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=mxRectangle.fromRectangle(b),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-
@@ -2982,9 +2983,9 @@ d,(g.container.clientHeight-10)/b.height/d))/20);mxUtils.hasScrollbars(g.contain
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());g.defaultGridEnabled=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=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,
+t.isEnabled=n;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=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+
+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,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...",
@@ -2996,41 +2997,41 @@ this.addAction("rounded",function(){g.getModel().beginUpdate();try{g.setCellStyl
c="1"==mxUtils.getValue(d,mxConstants.STYLE_ROUNDED,"0")?"0":"1";g.setCellStyles(mxConstants.STYLE_ROUNDED,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,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=
+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,[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),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 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",
+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")),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 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}
+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]};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(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={},m=this.ui.getHashValueForPages(this.shadowPages,p);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",m==l,l);if(null!=l&&l!=m){var q=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: "+m+"\nCurrent Details: "+JSON.stringify(p)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+q+"\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(C){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(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)),u=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,d,"Shadow Details: "+JSON.stringify(k)+
+"\nChecksum: "+l+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(n)+"\nFrom: "+u+"\nTo: "+v+"\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(C){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
null!=e&&e(C);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,C);else{var y=this.getCurrentUser(),x=null!=y?y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,C)}}catch(H){}}};
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 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"));
+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"));
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),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(),m=l.lastIndexOf("."),t="xml";0<m&&(t=l.substring(m));var q=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),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()+
":\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"+q+"\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&&
+"")+(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&&
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(),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,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 q=
-0;q<b.length;q++)this.ui.pages=this.ui.patchPages(this.ui.pages,b[q],!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=p,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(),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!=
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,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.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.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""};
@@ -3060,27 +3061,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))}),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,
+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,
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 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])};
+!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])};
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,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};
+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};
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 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.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.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"},
@@ -3144,8 +3145,8 @@ arguments):(this.begin(),this.moveTo(b+e,d),this.lineTo(b+c-e,d),this.quadTo(b+c
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","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 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=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=
+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=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,
@@ -3184,8 +3185,8 @@ c&&d(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(
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(Y){}})(k[m])});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 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(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:n})},k)});n()}catch(na){null!=c&&c(na)}};Editor.prototype.absoluteCssFonts=
+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(na){null!=c&&c(na)}};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";
@@ -3193,18 +3194,18 @@ else if("eot"==k||/(\.eot)($|\?)/i.test(b))d="application/vnd.ms-fontobject";els
function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(d){this.resolvedFontCss=d;null!=b&&b()})):null!=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,n,q,p,u,x,v,t,y,D){try{g=null!=g?g:!0;l=null!=l?l:!0;p=null!=p?p:this.graph;u=null!=u?u:0;var F=m?null:p.background;F==mxConstants.NONE&&(F=null);null==F&&(F=f);null==F&&0==m&&(F=t?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(p.getSvg(null,null,u,x,null,l,null,null,null,n,null,t,y,D),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(){x.drawImage(f,0,0);b(m,c)},0):(x.drawImage(f,0,0),b(m,c))},m=document.createElement("canvas"),n=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/n)):d/n);k=this.getMaxCanvasScale(n,q,k);n=
-Math.ceil(k*n);q=Math.ceil(k*q);m.setAttribute("width",n);m.setAttribute("height",q);var x=m.getContext("2d");null!=F&&(x.beginPath(),x.rect(0,0,n,q),x.fillStyle=F,x.fill());1!=k&&x.scale(k,k);if(v){var t=p.view,y=t.scale;t.scale=1;var A=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=y;var A="data:image/svg+xml;base64,"+A,D=p.gridSize*t.gridSteps*k,B=p.getGraphBounds(),J=t.translate.x*y,N=t.translate.y*y,I=J+(B.x-J)/y-u,E=N+(B.y-N)/y-u,C=new Image;C.onload=function(){try{for(var b=
--Math.round(D-mxUtils.mod((J-I)*k,D)),d=-Math.round(D-mxUtils.mod((N-E)*k,D));b<n;b+=D)for(var c=d;c<q;c+=D)x.drawImage(C,b/k,c/k);l()}catch(V){null!=e&&e(V)}};C.onerror=function(b){null!=e&&e(b)};C.src=A}else l()}catch(Ba){null!=e&&e(Ba)}});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(ea){null!=
-e&&e(ea)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(ha){null!=e&&e(ha)}}))}catch(ea){null!=e&&e(ea)}}),c,q)}catch(ma){null!=e&&e(ma)}};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>>>
+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,x,v,t,y,D){try{g=null!=g?g:!0;l=null!=l?l:!0;n=null!=n?n:this.graph;u=null!=u?u:0;var F=m?null:n.background;F==mxConstants.NONE&&(F=null);null==F&&(F=f);null==F&&0==m&&(F=t?this.graph.defaultPageBackgroundColor:"#ffffff");
+this.convertImages(n.getSvg(null,null,u,x,null,l,null,null,null,p,null,t,y,D),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(){x.drawImage(f,0,0);b(m,c)},0):(x.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 x=m.getContext("2d");null!=F&&(x.beginPath(),x.rect(0,0,p,q),x.fillStyle=F,x.fill());1!=k&&x.scale(k,k);if(v){var t=n.view,y=t.scale;t.scale=1;var A=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=y;var A="data:image/svg+xml;base64,"+A,D=n.gridSize*t.gridSteps*k,B=n.getGraphBounds(),J=t.translate.x*y,N=t.translate.y*y,I=J+(B.x-J)/y-u,E=N+(B.y-N)/y-u,C=new Image;C.onload=function(){try{for(var b=
+-Math.round(D-mxUtils.mod((J-I)*k,D)),d=-Math.round(D-mxUtils.mod((N-E)*k,D));b<p;b+=D)for(var c=d;c<q;c+=D)x.drawImage(C,b/k,c/k);l()}catch(V){null!=e&&e(V)}};C.onerror=function(b){null!=e&&e(b)};C.src=A}else l()}catch(Ba){null!=e&&e(Ba)}});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(ea){null!=
+e&&e(ea)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(ha){null!=e&&e(ha)}}))}catch(ea){null!=e&&e(ea)}}),c,q)}catch(ma){null!=e&&e(ma)}};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 n=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+n);g(b,n);g(b,4)}while(n);return"data:image/png;base64,"+
+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,"+
(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 q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=q.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)}});
+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)}});
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",
@@ -3232,34 +3233,34 @@ gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill
f(e.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{f(JSON.parse(b))}catch(W){}}};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 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=[],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&&(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 m=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(m);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=
+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){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 p={type:c,parentRow:l,index:q,isDeletable:!0,defVal:e,countProperty:g},q=n(b,"",p,0==q%2,k);f(b,e,p);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 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(m(d,c,n));else if("enum"==x){var D=n.enumList;for(u=0;u<D.length;u++)if(v=D[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<D.length;l++){var k=D[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,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(k(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=
+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 D=p.enumList;for(u=0;u<D.length;u++)if(v=D[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<D.length;l++){var k=D[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=
"relative";b.style.padding="0";var x=document.createElement("table");x.className="geProperties";x.style.whiteSpace="nowrap";x.style.width="100%";var v=document.createElement("tr");v.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"));v.style.cursor="pointer";var D=function(){var d=x.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(qa){}}else y.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<d.length;f++)d[f].style.display=c};mxEvent.addListener(v,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;D()});v.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";
-t.innerHTML=mxResources.get("value");v.appendChild(t);x.appendChild(v);var F=!1,B=!1,v=null;1==c.vertices.length&&0==c.edges.length?v=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(v=c.edges[0].id);null!=v&&x.appendChild(n("id",mxUtils.htmlEntities(v),{dispName:"ID",type:"readOnly"},!0,!1));for(var A in d)if(v=d[A],"function"!=typeof v.isVisible||v.isVisible(c,this)){var N=null!=c.style[A]?mxUtils.htmlEntities(c.style[A]+""):null!=v.getDefaultValue?v.getDefaultValue(c,this):v.defVal;if("separator"==
-v.type)B=!B;else{if("staticArr"==v.type)v.size=parseInt(c.style[v.sizeProperty]||d[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var J=v.dependentProps,E=[],C=[],t=0;t<J.length;t++){var O=c.style[J[t]];C.push(d[J[t]].subDefVal);E.push(null!=O?O.split(","):[])}v.dependentPropsDefVal=C;v.dependentPropsVals=E}x.appendChild(n(A,N,v,F,B));F=!F}}for(t=0;t<u.length;t++)for(v=u[t],d=v.parentRow,c=0;c<v.values.length;c++)A=n(v.name,v.values[c],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,
+t.innerHTML=mxResources.get("value");v.appendChild(t);x.appendChild(v);var F=!1,B=!1,v=null;1==c.vertices.length&&0==c.edges.length?v=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(v=c.edges[0].id);null!=v&&x.appendChild(p("id",mxUtils.htmlEntities(v),{dispName:"ID",type:"readOnly"},!0,!1));for(var A in d)if(v=d[A],"function"!=typeof v.isVisible||v.isVisible(c,this)){var N=null!=c.style[A]?mxUtils.htmlEntities(c.style[A]+""):null!=v.getDefaultValue?v.getDefaultValue(c,this):v.defVal;if("separator"==
+v.type)B=!B;else{if("staticArr"==v.type)v.size=parseInt(c.style[v.sizeProperty]||d[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var J=v.dependentProps,E=[],C=[],t=0;t<J.length;t++){var O=c.style[J[t]];C.push(d[J[t]].subDefVal);E.push(null!=O?O.split(","):[])}v.dependentPropsDefVal=C;v.dependentPropsVals=E}x.appendChild(p(A,N,v,F,B));F=!F}}for(t=0;t<u.length;t++)for(v=u[t],d=v.parentRow,c=0;c<v.values.length;c++)A=p(v.name,v.values[c],{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,
index:c,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==c%2,v.flipBkg),d.parentNode.insertBefore(A,d.nextSibling),d=A;b.appendChild(x);D();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 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)}))})(m);k.push(n);l.appendChild(n)}var q=mxUtils.bind(this,function(b){null!=k[b]&&(null!=this.format.currentScheme&&null!=k[this.format.currentScheme]&&(k[this.format.currentScheme].style.background=
-"transparent"),this.format.currentScheme=b,p(this.defaultColorSchemes[this.format.currentScheme]),k[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 k=f.getModel().getStyle(e[l]),m=0;m<g.length;m++)k=mxUtils.removeStylename(k,g[m]);var n=f.getModel().isVertex(e[l])?
-c.initialDefaultVertexStyle:c.initialdefaultEdgeStyle;null!=b?(mxEvent.isShiftDown(d)||(k=""==b.fill?mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,null)),k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,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(n,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(d)||(k=""==b.stroke?mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,b.stroke||mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,null)))):(k=mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,"#ffffff")),k=mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,
-"#000000")),k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(e[l])&&(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(n,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?
+"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!=k[b]&&(null!=this.format.currentScheme&&null!=k[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?(mxEvent.isShiftDown(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)),k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,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)))),mxEvent.isAltDown(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)))):(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";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()?
Editor.darkColor:"#ffffff"):b.fill||mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");d.style.border=b.stroke==mxConstants.NONE?l+" transparent":""==b.stroke?l+" "+mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):l+" "+(b.stroke||mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));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);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,
+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,
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"),
@@ -3270,38 +3271,38 @@ b[d].getAttribute("face"):b[d].style.fontFamily;null!=f&&Graph.addFont(f,c)}}};G
null;mxEvent.addListener(this.container,"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 C=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,f,e,g,l,k,m,n,
-q){C.apply(this,arguments);Graph.processFontAttributes(q)};var H=mxText.prototype.redraw;mxText.prototype.redraw=function(){H.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){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 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),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");
+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 C=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,f,e,g,l,k,m,p,
+q){C.apply(this,arguments);Graph.processFontAttributes(q)};var H=mxText.prototype.redraw;mxText.prototype.redraw=function(){H.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)});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(k,b);0<=c&&k.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)}m.appendChild(n)})(b[q]);g.appendChild(m);n.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 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";m.appendChild(n);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 p=mxUtils.button(mxResources.get("add"),function(){null!=c&&c(k,function(b){k=b;u()})});p.setAttribute("title",mxResources.get("add"));p.className="geBtn";p.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(p),m.appendChild(v));return{div:m,refresh:u}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,
+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=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 D=Graph.prototype.isFastZoomEnabled;
Graph.prototype.isFastZoomEnabled=function(){return D.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(A){null!=window.console&&console.log("Error in vars URL parameter: "+A)}};Graph.prototype.getExportVariables=
function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var E=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var d=E.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 M=Graph.prototype.getSvg;Graph.prototype.getSvg=function(b,d,c,f,e,g,l,k,m,n,q,p,u,v){var x=null,t=null,y=null;p||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultForegroundColor,y=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.defaultForegroundColor="darkTheme"==this.defaultThemeName?"#000000":"#f0f0f0",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var D=M.apply(this,
+var M=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,y=null;n||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultForegroundColor,y=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.defaultForegroundColor="darkTheme"==this.defaultThemeName?"#000000":"#f0f0f0",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var D=M.apply(this,
arguments),B=this.getCustomFonts();if(q&&0<B.length){var F=D.ownerDocument,N=null!=F.createElementNS?F.createElementNS(mxConstants.NS_SVG,"style"):F.createElement("style");null!=F.setAttributeNS?N.setAttributeNS("type","text/css"):N.setAttribute("type","text/css");for(var A="",E="",C=0;C<B.length;C++){var J=B[C].name,O=B[C].url;Graph.isCssFontUrl(O)?A+="@import url("+O+");\n":E+='@font-face {\nfont-family: "'+J+'";\nsrc: url("'+O+'");\n}\n'}N.appendChild(F.createTextNode(A+E));D.getElementsByTagName("defs")[0].appendChild(N)}null!=
x&&(this.defaultPageBackgroundColor=y,this.defaultForegroundColor=t,this.stylesheet=x,this.refresh());return D};var G=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var b=G.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 B=Graph.prototype.refresh;Graph.prototype.refresh=function(){B.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var L=Graph.prototype.loadStylesheet;
Graph.prototype.loadStylesheet=function(){L.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,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;k()}),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,k,c?0:
-n.fadeIn.delay));null!=n.fadeOut&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeOut,!0)),1,0,k,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,k,c?1:n.steps,c?0:n.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=
+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<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(aa){}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 O=Graph.prototype.isCellVisible;
Graph.prototype.isCellVisible=function(b){return O.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]),n=!1;if(0<m.length&&(m=m.split(" "),m.length>=b.length)){for(var q=n=0;q<m.length&&n<g;q++)null!=l[m[q]]&&n++;n=n==g}n&&(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()))};
+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]),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,
@@ -3323,42 +3324,42 @@ STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PAT
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 da=mxMarker.createMarker;mxMarker.createMarker=
-function(b,d,c,f,e,g,l,k,m,n){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&mxStencilRegistry.getStencil(q)}return da.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,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=J.get(),t=1/d.pageScale,B=D.checked;if(B)var t=parseInt(Q.value),N=parseInt(M.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;!B&&d.pageVisible?(p=d.getPageLayout(),u-=p.x*x.width,v-=p.y*x.height):B=!0;if(null==c){c=PrintDialog.createPrintPreview(d,t,x,0,u,v,B);c.pageSelector=!1;c.mathEnabled=!1;u=b.getCurrentFile();null!=u&&(c.title=u.getTitle());var E=c.writeHead;c.writeHead=function(c){E.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">'),
+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 da.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=J.get(),t=1/d.pageScale,B=D.checked;if(B)var t=parseInt(Q.value),N=parseInt(M.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;!B&&d.pageVisible?(n=d.getPageLayout(),u-=n.x*x.width,v-=n.y*x.height):B=!0;if(null==c){c=PrintDialog.createPrintPreview(d,t,x,0,u,v,B);c.pageSelector=!1;c.mathEnabled=!1;u=b.getCurrentFile();null!=u&&(c.title=u.getTitle());var E=c.writeHead;c.writeHead=function(c){E.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 C=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=C.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(),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=B;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,B=g[u].url,Graph.isCssFontUrl(B)?c.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(B)+
-'" 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(B)+'");\n}'),c.wnd.document.writeln("</style>"))}l&&(d.useCssTransforms=l,d.currentTranslate=k,d.currentScale=m,d.view.translate=n,d.view.scale=q);return c}var f=parseInt(G.value)/100;isNaN(f)&&(f=1,G.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,n=!q.checked,p=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,l,k,D.checked,Q.value,M.value,parseInt(y.value)/100,parseInt(G.value)/100,J.get());else{n&&(n=l==m&&k==m);if(!n&&null!=b.pages&&b.pages.length){var x=0,n=b.pages.length-1;q.checked||(x=parseInt(l)-1,n=parseInt(k)-1);for(var t=x;t<=n;t++){var B=b.pages[t],l=B==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),k=!0,x=
+'" 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(B)+'");\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(G.value)/100;isNaN(f)&&(f=1,G.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,D.checked,Q.value,M.value,parseInt(y.value)/100,parseInt(G.value)/100,J.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 B=b.pages[t],l=B==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),k=!0,x=
!1,N=null,E=null;null==B.viewState&&null==B.root&&b.updatePageRoot(B);null!=B.viewState&&(k=B.viewState.pageVisible,x=B.viewState.mathEnabled,N=B.viewState.background,E=B.viewState.backgroundImage,l.extFonts=B.viewState.extFonts);l.background=N;l.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;l.pageVisible=k;l.mathEnabled=x;var C=l.getGlobalVariable;l.getGlobalVariable=function(d){return"page"==d?B.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=b.pages?b.pages.length:1:C.apply(this,
-arguments)};document.body.appendChild(l.container);b.updatePageRoot(B);l.model.setRoot(B.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 k=1,m=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&&(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(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),D=t.cloneNode(!0);D.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(D);n.appendChild(l);x=document.createElement("table");x.style.display="inline-block";
+arguments)};document.body.appendChild(l.container);b.updatePageRoot(B);l.model.setRoot(B.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),D=t.cloneNode(!0);D.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(D);p.appendChild(l);x=document.createElement("table");x.style.display="inline-block";
var B=document.createElement("tbody"),N=document.createElement("tr"),E=N.cloneNode(!0),C=document.createElement("td"),O=C.cloneNode(!0),F=C.cloneNode(!0),H=C.cloneNode(!0),L=C.cloneNode(!0),K=C.cloneNode(!0);C.style.textAlign="right";H.style.textAlign="right";mxUtils.write(C,mxResources.get("fitTo"));var Q=document.createElement("input");Q.style.cssText="margin:0 8px 0 8px;";Q.setAttribute("value","1");Q.setAttribute("min","1");Q.setAttribute("type","number");Q.style.width="40px";O.appendChild(Q);
l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));F.appendChild(l);mxUtils.write(H,mxResources.get("fitToBy"));var M=Q.cloneNode(!0);L.appendChild(M);mxEvent.addListener(Q,"focus",function(){D.checked=!0});mxEvent.addListener(M,"focus",function(){D.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));K.appendChild(l);N.appendChild(C);N.appendChild(O);N.appendChild(F);E.appendChild(H);E.appendChild(L);E.appendChild(K);
-B.appendChild(N);B.appendChild(E);x.appendChild(B);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 J=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 G=document.createElement("input");G.style.cssText="margin:0 8px 0 8px;";G.setAttribute("value","100 %");G.style.width="60px";n.appendChild(G);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==
+B.appendChild(N);B.appendChild(E);x.appendChild(B);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 J=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 G=document.createElement("input");G.style.cssText="margin:0 8px 0 8px;";G.setAttribute("value","100 %");G.style.width="60px";p.appendChild(G);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!=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 Q=document.createElement("canvas"),X=new Image;X.onload=function(){try{Q.getContext("2d").drawImage(X,
0,0);var b=Q.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=b&&6<b.length}catch(J){}};X.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(F){}})();
(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.5.8";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.5.9";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,n,p){n=null!=n?n: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="+n+"&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{p||null==window.console||console.error(n,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,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)):
"")}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;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;(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"),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(q){}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(q){}})();EditorUi.prototype.openLink=
+!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;(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);c()};EditorUi.prototype.setMathEnabled=function(b){this.editor.graph.mathEnabled=b;this.editor.updateGraphComponents();this.editor.graph.refresh();this.editor.graph.defaultMathEnabled=
b;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=
@@ -3368,200 +3369,200 @@ k.innerHTML=l,e.appendChild(k),f.status=k),this.pause=mxUtils.bind(this,function
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),n=this.editor.extractGraphModel(k.documentElement,null!=this.pages||"hidden"==
-this.diagramContainer.style.visibility),d=null!=n?mxUtils.getXml(n):""}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;
+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(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,n,p,v,t,x,C){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(C){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");
+EditorUi.prototype.createFileData=function(b,c,e,g,k,q,n,v,t,x,C){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(C){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"),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));
-C=C?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!n&&!k&&(p||null!=e&&/(\.html)$/i.test(e.getTitle())))C=this.getHtml2(mxUtils.getXml(l),c,null!=e?e.getTitle():null,d,f);else if(n||!k&&null!=e&&/(\.svg)$/i.test(e.getTitle()))null==e||e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER||(g=null),C=this.getEmbeddedSvg(C,c,g,null,v,t,f);return C};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);
+C=C?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!q&&!k&&(n||null!=e&&/(\.html)$/i.test(e.getTitle())))C=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),C=this.getEmbeddedSvg(C,c,g,null,v,t,f);return C};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(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&&
+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="["+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,n,p,v,t,x,C){k=null!=k?k:!0;n=null!=n?n:!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)}}p=null!=p?p:this.getXmlFileData(k,
-n,x,C);t=null!=t?t:this.getCurrentFile();b=this.createFileData(p,d,t,window.location.href,b,c,e,g,k,v,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return b};EditorUi.prototype.getHtml=function(b,c,e,g,k,n){n=null!=n?n:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var d=n?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),l=c.view.scale;n=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",n);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==
+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,v,t,x,C){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,C);t=null!=t?t:this.getCurrentFile();b=this.createFileData(n,d,t,window.location.href,b,c,e,g,k,v,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));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(),p=k.getChildren(k.root),e=0;e<p.length;e++){var v=p[e];k.setVisible(v,b[v.id]||
+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 v=n[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,C,H){try{g=null!=g?g:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!k),f=d+("xml"==b||"pdf"==b&&C?".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!=n&&(this.editor.graph.pageVisible=n);var e=this.createDownloadRequest(d,b,g,c,p,k,v,t,x,C,H);this.editor.graph.pageVisible=f;return e}catch(X){this.handleError(X)}}));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(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,g,k,n,p,v,t,x,C){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!=C?m="&from="+C.from+"&to="+C.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!=
+this.currentPage.getName());return d};EditorUi.prototype.downloadFile=function(b,c,e,g,k,q,n,v,t,x,C,H){try{g=null!=g?g:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!k),f=d+("xml"==b||"pdf"==b&&C?".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,v,t,x,C,H);this.editor.graph.pageVisible=f;return e}catch(X){this.handleError(X)}}));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 u=this.editor.graph.background;if(n||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();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(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,g,k,q,n,v,t,x,C){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!=C?m="&from="+C.from+"&to="+C.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!=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 p=null;try{for(b=b.firstChild;null!=b;){if("update"==
+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 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 C=x.attributes,H=0;H<C.length;H++)g.setAttributeForCell(v,C[H].nodeName,0<C[H].nodeValue.length?C[H].nodeValue:null)}}catch(O){null!=window.console&&console.log("Error in value for "+v.id+": "+O)}try{var D=b.getAttribute("style");null!=D&&g.model.setStyle(v,D)}catch(O){null!=
window.console&&console.log("Error in style for "+v.id+": "+O)}try{var E=b.getAttribute("icon");if(null!=E){var M=0<E.length?JSON.parse(E):null;null!=M&&M.append||g.removeCellOverlays(v);null!=M&&g.addCellOverlay(v,d(M))}}catch(O){null!=window.console&&console.log("Error in icon for "+v.id+": "+O)}try{var G=b.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),K=g.getCellGeometry(v);if(null!=K){K=K.clone();for(key in G){var B=parseFloat(G[key]);"dx"==key?K.x+=B:"dy"==key?K.y+=B:"dw"==key?K.width+=
B:"dh"==key?K.height+=B:K[key]=parseFloat(G[key])}g.model.setGeometry(v,K)}}}catch(O){null!=window.console&&console.log("Error in icon for "+v.id+": "+O)}}}else if("model"==b.nodeName){for(var L=b.firstChild;null!=L&&L.nodeType!=mxConstants.NODETYPE_ELEMENT;)L=L.nextSibling;null!=L&&(new mxCodec(b.firstChild)).decode(L,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);
+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};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(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"!=
+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"!=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,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(),
+function(b,c,e,g,k,q,n){};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 f=JSON.parse(mxUtils.getTextContent(d.documentElement));
this.libraryLoaded(b,f,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 p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding="8px";p.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 H=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!=H?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));
-if(b.isEditable()){var D=this.editor.graph,E=null,M=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),G=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=E&&null!=E.parentNode&&E.parentNode.removeChild(E),E=t.cloneNode(!1),E.setAttribute("src",Editor.spinImage),E.setAttribute("title",mxResources.get("saving")),E.style.cursor="default",E.style.marginRight="2px",E.style.marginTop="-2px",p.insertBefore(E,p.firstChild),m.style.paddingRight=
-18*p.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=E&&null!=E.parentNode&&(E.parentNode.removeChild(E),m.style.paddingRight=18*p.childNodes.length+"px")})):null==H&&(H=t.cloneNode(!1),H.setAttribute("src",Editor.saveImage),H.setAttribute("title",mxResources.get("save")),p.insertBefore(H,p.firstChild),mxEvent.addListener(H,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
-H||b.isModified()||(m.style.paddingRight=18*p.childNodes.length+"px",H.parentNode.removeChild(H),H=null)});mxEvent.consume(d)})),m.style.paddingRight=18*p.childNodes.length+"px")}),K=mxUtils.bind(this,function(b,d,e,g){b=D.cloneCells(mxUtils.sortCells(D.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=D.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))),
+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 H=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!=H?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));
+if(b.isEditable()){var D=this.editor.graph,E=null,M=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),G=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=E&&null!=E.parentNode&&E.parentNode.removeChild(E),E=t.cloneNode(!1),E.setAttribute("src",Editor.spinImage),E.setAttribute("title",mxResources.get("saving")),E.style.cursor="default",E.style.marginRight="2px",E.style.marginTop="-2px",n.insertBefore(E,n.firstChild),m.style.paddingRight=
+18*n.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=E&&null!=E.parentNode&&(E.parentNode.removeChild(E),m.style.paddingRight=18*n.childNodes.length+"px")})):null==H&&(H=t.cloneNode(!1),H.setAttribute("src",Editor.saveImage),H.setAttribute("title",mxResources.get("save")),n.insertBefore(H,n.firstChild),mxEvent.addListener(H,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
+H||b.isModified()||(m.style.paddingRight=18*n.childNodes.length+"px",H.parentNode.removeChild(H),H=null)});mxEvent.consume(d)})),m.style.paddingRight=18*n.childNodes.length+"px")}),K=mxUtils.bind(this,function(b,d,e,g){b=D.cloneCells(mxUtils.sortCells(D.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=D.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);G(e);null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)}),B=mxUtils.bind(this,function(b){if(D.isSelectionEmpty())D.getRubberband().isActive()?(D.getRubberband().execute(b),D.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=D.getSelectionCells(),c=D.view.getBounds(d),f=D.view.scale;c.x/=f;c.y/=f;c.width/=f;c.height/=f;c.x-=D.view.translate.x;
c.y-=D.view.translate.y;K(d,c)}mxEvent.consume(b)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(b){D.isMouseDown&&null!=D.panningManager&&null!=D.graphHandler.first&&(D.graphHandler.suspend(),null!=D.graphHandler.hint&&(D.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor="#f1f3f4",k.style.cursor="copy",D.panningManager.stop(),D.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){D.isMouseDown&&null!=D.panningManager&&null!=D.graphHandler&&
(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,D.panningManager.stop(),D.graphHandler.reset(),D.isMouseDown=!1,D.autoScroll=!0,B(b),mxEvent.consume(b))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(b){D.isMouseDown&&null!=D.graphHandler.first&&(D.graphHandler.resume(),null!=D.graphHandler.hint&&(D.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",D.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,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 x=!1,t=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);G(b);this.spinner.stop();x=!0}catch(Y){}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)}x=!0}catch(Y){null!=window.console&&console.log("error in drop handler:",Y)}x||(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){t(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?t(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):t(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",M);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==
-k&&M(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",B);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))}m.appendChild(p);m.style.paddingRight=18*p.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var d=0;d<b.length;d++){var f=b[d],e=f.data;if(null!=e){var e=this.convertDataUri(e),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+e,f.w,f.h,"",f.title||"",!1,!1,!0))}else null!=f.xml&&(e=this.stringToCells(Graph.decompress(f.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,p,q,n,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,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 x=!1,t=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);G(b);this.spinner.stop();x=!0}catch(Y){}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)}x=!0}catch(Y){null!=window.console&&console.log("error in drop handler:",Y)}x||(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!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?this.importVisio(v,function(b){t(b,"text/xml")},null,n):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,n)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?t(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):t(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",M);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==
+k&&M(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",B);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 f=b[d],e=f.data;if(null!=e){var e=this.convertDataUri(e),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+e,f.w,f.h,"",f.title||"",!1,!1,!0))}else null!=f.xml&&(e=this.stringToCells(Graph.decompress(f.xml)),
0<e.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(e,f.w,f.h,f.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=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
-Editor.darkColor,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",
-endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(b,c,e,g,k){b=new ImageDialog(this,b,c,e,g,k);this.showDialog(b.container,
-Graph.fileSupport?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,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(E){}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(){e.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;e.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";
+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=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultForegroundColor="#f0f0f0",Graph.prototype.defaultPageBorderColor=
+"#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,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",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(b,
+c,e,g,k){b=new ImageDialog(this,b,c,e,g,k);this.showDialog(b.container,Graph.fileSupport?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(E){}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(){e.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;e.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";
mxUtils.write(c,"<"+d[b].email+">");c.setAttribute("disabled","disabled");e.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=d.length;e.appendChild(c)}var d=this.drive.getUsersList(),c=document.createElement("div"),f=document.createElement("span");f.style.marginTop="6px";mxUtils.write(f,mxResources.get("changeUser")+": ");c.appendChild(f);var e=document.createElement("select");e.style.width="200px";b();mxEvent.addListener(e,"change",mxUtils.bind(this,
function(){var c=e.value,f=d.length!=c;f&&this.drive.setUser(d[c]);this.drive.authorize(f,mxUtils.bind(this,function(){f||(d=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));c.appendChild(e);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 p=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)):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,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),C=0;p<t;++C,++p)x[C]=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,v){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,450,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,v):null!=d&&0<d.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(b,
-d,e,g,c,f)}catch(M){this.handleError(M)}}))}catch(E){this.handleError(E)}}),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,420,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=
-"#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var c=d.getBoundingClientRect();
-this.tagsDialog.style.left=c.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=c.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(b)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(){var b=this.editor.graph.getAllTags();d.style.display=0<b.length?"":"none"}));k.apply(this,arguments)}this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",
-mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var c=b(mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",d);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)d.apply(this);else{this.exportDialog=document.createElement("div");var e=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,
-"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=e.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.zIndex;var 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,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(E){this.handleError(E)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),b,n,!0,d,e)}catch(E){this.handleError(E)}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,420,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,C,H,D,E){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=C?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,C,H);g&&this.editor.graph.addSvgShadow(l);var m=this.getBaseFilename()+(k?".drawio":"")+".svg";E=null!=E?E:mxUtils.bind(this,function(b){this.isLocalFileSave()||
-b.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});var 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));E(Graph.xmlDeclaration+"\n"+(k?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b))});this.editor.graph.mathEnabled&&this.editor.addMathCss(l);
-var u=mxUtils.bind(this,function(b){n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(b,q,this.thumbImageCache)):q(b)});D?this.embedFonts(l,u):(this.editor.addFontCss(l),u(l))}catch(da){this.handleError(da)}};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,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,C,H){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!=C&&0<C.length&&(d.edit=C);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):"";H(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.DRAWIO_VIEWER_URL?window.DRAWIO_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 p=this.getCurrentFile();null==e&&null!=p&&p.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(p.getId())})));f.setAttribute("checked","checked");null==e&&k.setAttribute("disabled","disabled");d.appendChild(l);var t=this.addLinkSection(d),H=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.style.marginRight="12px";D.value=
-"100%";d.appendChild(D);var E=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,M=M=this.addCheckbox(d,mxResources.get("allPages"),l,!l),G=this.addCheckbox(d,mxResources.get("layers"),!0),K=this.addCheckbox(d,mxResources.get("tags"),!0),B=this.addCheckbox(d,mxResources.get("lightbox"),!0),L=this.addEditButton(d,B),O=L.getEditInput();O.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?O.removeAttribute("disabled"):O.setAttribute("disabled",
-"disabled");O.checked&&B.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){g(k.checked?e:null,H.checked,D.value,t.getTarget(),t.getColor(),E.checked,M.checked,G.checked,K.checked,B.checked,L.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 E=this.addLinkSection(d,n);e=null!=this.pages&&1<this.pages.length;var M=null;
-if(null==l||l.constructor!=window.DriveFile||c)M=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var G=this.addCheckbox(d,mxResources.get("lightbox"),!0,null,null,!n),K=this.addEditButton(d,G),B=K.getEditInput();n&&(B.style.marginLeft=G.style.marginLeft,G.style.display="none",b-=20);var L=this.addCheckbox(d,mxResources.get("layers"),!0);L.style.marginLeft=B.style.marginLeft;L.style.marginTop="8px";var O=this.addCheckbox(d,mxResources.get("tags"),!0);O.style.marginLeft=B.style.marginLeft;O.style.marginBottom=
-"16px";O.style.marginTop="16px";mxEvent.addListener(G,"change",function(){G.checked?(L.removeAttribute("disabled"),B.removeAttribute("disabled")):(L.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&G.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){k(E.getTarget(),E.getColor(),null==M?!0:M.checked,G.checked,K.getLink(),L.checked,null!=p?p.value:null,
-null!=t?t.value:null,O.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)):E.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:"+
+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 u=q=null;null!=f&&null!=f.helpLink?(q=mxResources.get("help"),u=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(f.helpLink)})):null!=f&&null!=f.ownerEmail&&(q=mxResources.get("contactOwner"),n+=mxUtils.htmlEntities(" ("+q+": "+f.ownerEmail+")"),u=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(f.ownerEmail))}));this.showError(c,n,l,e,m,null,null,q,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,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,"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))),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),C=0;n<t;++C,++n)x[C]=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,v){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,450,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,v):null!=d&&0<d.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(b,d,e,g,c,f)}catch(M){this.handleError(M)}}))}catch(E){this.handleError(E)}}),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,420,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>"+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="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&
+(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var c=d.getBoundingClientRect();this.tagsDialog.style.left=c.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=c.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(b)}),
+Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var b=this.editor.graph.getAllTags();d.style.display=0<b.length?"":"none"}));k.apply(this,arguments)}this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&
+(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),
+this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var c=b(mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",d);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)d.apply(this);
+else{this.exportDialog=document.createElement("div");var e=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color=
+"#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=e.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.zIndex;var 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(E){this.handleError(E)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),b,q,!0,d,e)}catch(E){this.handleError(E)}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,420,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,t,y,x,C,H,D,E){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=C?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(f,b,n,t,null,e,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,C,H);g&&this.editor.graph.addSvgShadow(l);var m=
+this.getBaseFilename()+(k?".drawio":"")+".svg";E=null!=E?E:mxUtils.bind(this,function(b){this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});var p=mxUtils.bind(this,function(b){this.spinner.stop();k&&b.setAttribute("content",this.getFileData(!0,null,null,null,e,y,null,null,null,!1));E(Graph.xmlDeclaration+"\n"+(k?Graph.svgFileComment+
+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b))});this.editor.graph.mathEnabled&&this.editor.addMathCss(l);var u=mxUtils.bind(this,function(b){q?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(b,p,this.thumbImageCache)):p(b)});D?this.embedFonts(l,u):(this.editor.addFontCss(l),u(l))}catch(da){this.handleError(da)}};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,t){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!=t&&d.setAttribute("name",t);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");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,t,y,x){y=this.createUrlParameters(b,
+c,e,g,k,q,y);b=this.getCurrentFile();c=!0;null!=n?e="#U"+encodeURIComponent(n):(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,q,n,t,y,x,C,H){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!=C&&0<C.length&&(d.edit=C);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):"";H(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.DRAWIO_VIEWER_URL?window.DRAWIO_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),H=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft=
+"4px";D.style.marginRight="12px";D.value="100%";d.appendChild(D);var E=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,M=M=this.addCheckbox(d,mxResources.get("allPages"),l,!l),G=this.addCheckbox(d,mxResources.get("layers"),!0),K=this.addCheckbox(d,mxResources.get("tags"),!0),B=this.addCheckbox(d,mxResources.get("lightbox"),!0),L=this.addEditButton(d,B),O=L.getEditInput();O.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?O.removeAttribute("disabled"):
+O.setAttribute("disabled","disabled");O.checked&&B.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){g(k.checked?e:null,H.checked,D.value,t.getTarget(),t.getColor(),E.checked,M.checked,G.checked,K.checked,B.checked,L.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 E=this.addLinkSection(d,q);e=null!=this.pages&&1<this.pages.length;var M=null;
+if(null==l||l.constructor!=window.DriveFile||c)M=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var G=this.addCheckbox(d,mxResources.get("lightbox"),!0,null,null,!q),K=this.addEditButton(d,G),B=K.getEditInput();q&&(B.style.marginLeft=G.style.marginLeft,G.style.display="none",b-=20);var L=this.addCheckbox(d,mxResources.get("layers"),!0);L.style.marginLeft=B.style.marginLeft;L.style.marginTop="8px";var O=this.addCheckbox(d,mxResources.get("tags"),!0);O.style.marginLeft=B.style.marginLeft;O.style.marginBottom=
+"16px";O.style.marginTop="16px";mxEvent.addListener(G,"change",function(){G.checked?(L.removeAttribute("disabled"),B.removeAttribute("disabled")):(L.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&G.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){k(E.getTarget(),E.getColor(),null==M?!0:M.checked,G.checked,K.getLink(),L.checked,null!=n?n.value:null,
+null!=t?t.value:null,O.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",!1,null)):E.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 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||
+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 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 B=document.createElement("select");B.style.marginTop="16px";B.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(m=0;m<b.length;m++)if(!f.isSelectionEmpty()||"selectionOnly"!=b[m]){var L=
-document.createElement("option");mxUtils.write(L,mxResources.get(b[m]));L.setAttribute("value",b[m]);B.appendChild(L)}y?(mxUtils.write(d,mxResources.get("size")+":"),d.appendChild(B),mxUtils.br(d),l+=26,mxEvent.addListener(B,"change",function(){"selectionOnly"==B.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()?
+document.createElement("option");mxUtils.write(L,mxResources.get(b[m]));L.setAttribute("value",b[m]);B.appendChild(L)}y?(mxUtils.write(d,mxResources.get("size")+":"),d.appendChild(B),mxUtils.br(d),l+=26,mxEvent.addListener(B,"change",function(){"selectionOnly"==B.value&&(u.checked=!0)})):q&&(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):(B.value="diagram",K.setAttribute("checked","checked"),K.defaultChecked=!0,mxEvent.addListener(u,"change",function(){B.value=u.checked?"selectionOnly":"diagram"}));var O=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),da=null;Editor.isDarkMode()&&(da=this.addCheckbox(d,mxResources.get("dark"),!0),l+=26);var N=this.addCheckbox(d,mxResources.get("shadow"),
f.shadowVisible),Q=document.createElement("input");Q.style.marginTop="16px";Q.style.marginRight="8px";Q.setAttribute("type","checkbox");var X=document.createElement("input");X.style.marginTop="16px";X.style.marginRight="8px";X.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||Q.setAttribute("disabled","disabled");c&&(d.appendChild(Q),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),d.appendChild(X),mxUtils.write(d,mxResources.get("embedFonts")),mxUtils.br(d),l+=
-60);var F=null;if("png"==t||"jpeg"==t)F=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),l+=30;var J=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),p,null,null,"jpeg"!=t);J.style.marginBottom="16px";var A=document.createElement("select");A.style.maxWidth="260px";A.style.marginLeft="8px";A.style.marginRight="10px";A.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));
+60);var F=null;if("png"==t||"jpeg"==t)F=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),l+=30;var J=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=t);J.style.marginBottom="16px";var A=document.createElement("select");A.style.maxWidth="260px";A.style.marginLeft="8px";A.style.marginRight="10px";A.className="geBtn";c=document.createElement("option");c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));
A.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("openInNewWindow"));A.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));A.appendChild(c);"svg"==t&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(A),mxUtils.br(d),mxUtils.br(d),l+=50);e=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=
-q.value;k(q.value,O.checked,!u.checked,N.checked,J.checked,Q.checked,v.value,K.checked,!1,A.value,null!=F?F.checked:null,null!=da?da.checked:null,B.value,X.checked)}),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),D=this.addEditButton(d,t),E=D.getEditInput(),M=1<f.model.getChildCount(f.model.getRoot()),G=this.addCheckbox(d,mxResources.get("layers"),M,
-!M);G.style.marginLeft=E.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(M&&G.removeAttribute("disabled"),E.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"));E.checked&&t.checked?D.getEditSelect().removeAttribute("disabled"):D.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){b(m.checked,q.checked,p.checked,t.checked,
-D.getLink(),G.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=
+p.value;k(p.value,O.checked,!u.checked,N.checked,J.checked,Q.checked,v.value,K.checked,!1,A.value,null!=F?F.checked:null,null!=da?da.checked:null,B.value,X.checked)}),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),D=this.addEditButton(d,t),E=D.getEditInput(),M=1<f.model.getChildCount(f.model.getRoot()),G=this.addCheckbox(d,mxResources.get("layers"),M,
+!M);G.style.marginLeft=E.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(M&&G.removeAttribute("disabled"),E.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"));E.checked&&t.checked?D.getEditSelect().removeAttribute("disabled"):D.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){b(m.checked,p.checked,n.checked,t.checked,
+D.getLink(),G.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=
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(n){}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(q){}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 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(D){null!=c&&c(D)}}),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(C){null!=c&&c(C)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,g,k,n,p,t,y,x,C,H,D){t=null!=t?t:!0;p=null!=y?y:c.background;p==mxConstants.NONE&&(p=null);n=c.getSvg(p,x,C,null,null,n,null,null,null,c.shadowVisible||H,null,D,"diagram");(c.shadowVisible||H)&&c.addSvgShadow(n);null!=b&&n.setAttribute("content",b);null!=e&&n.setAttribute("resource",e);var d=mxUtils.bind(this,function(b){b=(g?"":Graph.xmlDeclaration+
-"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(b);null!=k&&k(b);return b});c.mathEnabled&&this.editor.addMathCss(n);if(null!=k)this.embedFonts(n,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){d(b)})):d(b)}));else return d(n)};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,p,t,y,x,C,H,D){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,C)}catch(G){this.handleError(G)}}),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,H,D)}catch(M){this.spinner.stop(),this.handleError(M)}}};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 M=q[u].getAttribute("id");q[u].removeAttribute("id");var G=this.updatePageRoot(new DiagramPage(q[u]));b[M]=q[u].getAttribute("id");var K=this.pages.length;null==G.getName()&&G.setName(mxResources.get("pageWithNumber",
-[K+1]));f.model.execute(new ChangePage(this,G,G,K,!0));n.push(G)}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(B){if(k)throw B;this.handleError(B)}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=
+!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(D){null!=c&&c(D)}}),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(C){null!=c&&c(C)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,g,k,q,n,t,y,x,C,H,D){t=null!=t?t:!0;n=null!=y?y:c.background;n==mxConstants.NONE&&(n=null);q=c.getSvg(n,x,C,null,null,q,null,null,null,c.shadowVisible||H,null,D,"diagram");(c.shadowVisible||H)&&c.addSvgShadow(q);null!=b&&q.setAttribute("content",b);null!=e&&q.setAttribute("resource",e);var d=mxUtils.bind(this,function(b){b=(g?"":Graph.xmlDeclaration+
+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(b);null!=k&&k(b);return b});c.mathEnabled&&this.editor.addMathCss(q);if(null!=k)this.embedFonts(q,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){d(b)})):d(b)}));else return d(q)};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,q,n,t,y,x,C,H,D){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,C)}catch(G){this.handleError(G)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,e,b||1,c,g,null,null,q,n,x,H,D)}catch(M){this.spinner.stop(),this.handleError(M)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,e,g,k,q,n){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&&!q){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 t=p[0].getAttribute("name");null!=t&&
+""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<p.length){q=[];var u=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,u=1);for(;u<p.length;u++){var M=p[u].getAttribute("id");p[u].removeAttribute("id");var G=this.updatePageRoot(new DiagramPage(p[u]));b[M]=p[u].getAttribute("id");var K=this.pages.length;null==G.getName()&&G.setName(mxResources.get("pageWithNumber",
+[K+1]));f.model.execute(new ChangePage(this,G,G,K,!0));q.push(G)}this.updatePageLinks(b,q)}}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]);n&&this.insertHandler(d,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{f.model.endUpdate()}}}catch(B){if(k)throw B;this.handleError(B)}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(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(H){}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(M){e({message:mxResources.get("errorLoadingFile")})}});d.readAsText(b)}else this.doImportVisio(b,c,e,g)}catch(E){e(E)}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(E){e({})}});n.send(d)}else try{this.doImportVisio(b,c,e,g)}catch(H){e(H)}}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(q){e(q)}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).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(H){}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(M){e({message:mxResources.get("errorLoadingFile")})}});d.readAsText(b)}else this.doImportVisio(b,c,e,g)}catch(E){e(E)}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(E){e({})}});p.send(d)}else try{this.doImportVisio(b,c,e,g)}catch(H){e(H)}}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)||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(q){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(q){null!=window.console&&console.error(q),e(q)}}else e({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=
+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",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(H){f=f||100,l=l||100}e(d.convertDataUri(Editor.createSvgDataUri(b)),f,l)}else g({message:mxResources.get("invalidInput")})}catch(H){g(H)}})}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)))),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(B){g(B)}};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(D){}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);
+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(B){g(B)}};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,q,n,t){q=null!=q?q:!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," ")],{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,q,!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,q,!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,q,!0,t);if(0<l.length)return l}catch(D){}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)+";"))}),n,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,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.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,q,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,q,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,
@@ -3569,23 +3570,23 @@ function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize)
function(b,d,c){StorageFile.deleteFile(this,b,d,c)});if(!c){var e=Editor.useLocalStorage;Editor.useLocalStorage=!b}window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));window.openFile.setConsumer(mxUtils.bind(this,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,p,t,y,x,C,H){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!=H?mxEvent.isControlDown(H):null);null!=t&&t(d)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=C?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(f=this.importXml(c,e,g,x,null,null!=H?mxEvent.isControlDown(H):null),y=!0)),y||(c=this.editor.graph,C=b.indexOf(";"),0<C&&(b=b.substring(0,C)+b.substring(b.indexOf(",",C+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!=H?mxEvent.isControlDown(H):null));d||null==t||t(f);return f};EditorUi.prototype.importFiles=function(b,c,e,g,k,n,p,t,y,x,C,H,D){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=C||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,H,D)}catch(pa){return this.handleError(pa),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=[],B=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=H?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)?B(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"),x=f.getAttribute("height"),p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,x=null!=x&&"%"!=x.charAt(x.length-1)?parseFloat(x):NaN,u=f.getAttribute("viewBox");if(null==u||0==u.length)f.setAttribute("viewBox","0 0 "+p+" "+x);else if(isNaN(p)||isNaN(x)){var B=u.split(" ");3<B.length&&(p=parseFloat(B[2]),x=parseFloat(B[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(f));
-var N=Math.min(1,Math.min(g/Math.max(1,p)),g/Math.max(1,x)),D=k(q,n.type,c+d*m,e+d*m,Math.max(1,Math.round(p*N)),Math.max(1,Math.round(x*N)),n.name);if(isNaN(p)||isNaN(x)){var y=new Image;y.onload=mxUtils.bind(this,function(){p=Math.max(1,y.width);x=Math.max(1,y.height);D[0].geometry.width=p;D[0].geometry.height=x;f.setAttribute("viewBox","0 0 "+p+" "+x);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,[D[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return D}}}catch(ea){}return null})):B(d,mxUtils.bind(this,function(){return k(N,"text/xml",c+d*m,e+d*m,0,0,n.name)}))}else B(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==n.type){var D=H?null:this.extractGraphModelFromPng(b.target.result);if(null!=D&&0<D.length){var y=new Image;y.src=b.target.result;B(d,mxUtils.bind(this,function(){return k(D,"text/xml",c+d*m,e+d*m,y.width,y.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){B(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=f&&this.isResampleImageSize(n.size,C)?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,C,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){B(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){B(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?
+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,v,y,x,C,H){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!=H?mxEvent.isControlDown(H):null);null!=v&&v(d)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=C?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(f=this.importXml(c,e,g,x,null,null!=H?mxEvent.isControlDown(H):null),y=!0)),y||(c=this.editor.graph,C=b.indexOf(";"),0<C&&(b=b.substring(0,C)+b.substring(b.indexOf(",",C+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!=v&&v(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);v(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!=H?mxEvent.isControlDown(H):null));d||null==v||v(f);return f};EditorUi.prototype.importFiles=function(b,c,e,g,k,n,t,v,y,x,C,H,D){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=C||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,H,D)}catch(pa){return this.handleError(pa),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,u=[],B=mxUtils.bind(this,function(b,d){u[b]=d;if(0==--q){this.spinner.stop();if(null!=v)v(u);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<u.length;e++){var f=u[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=H?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)?B(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"),x=f.getAttribute("height"),t=null!=t&&"%"!=t.charAt(t.length-1)?parseFloat(t):NaN,x=null!=x&&"%"!=x.charAt(x.length-1)?parseFloat(x):NaN,u=f.getAttribute("viewBox");if(null==u||0==u.length)f.setAttribute("viewBox","0 0 "+t+" "+x);else if(isNaN(t)||isNaN(x)){var B=u.split(" ");3<B.length&&(t=parseFloat(B[2]),x=parseFloat(B[3]))}n=Editor.createSvgDataUri(mxUtils.getXml(f));
+var N=Math.min(1,Math.min(g/Math.max(1,t)),g/Math.max(1,x)),D=k(n,p.type,c+d*m,e+d*m,Math.max(1,Math.round(t*N)),Math.max(1,Math.round(x*N)),p.name);if(isNaN(t)||isNaN(x)){var y=new Image;y.onload=mxUtils.bind(this,function(){t=Math.max(1,y.width);x=Math.max(1,y.height);D[0].geometry.width=t;D[0].geometry.height=x;f.setAttribute("viewBox","0 0 "+t+" "+x);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,[D[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return D}}}catch(ea){}return null})):B(d,mxUtils.bind(this,function(){return k(N,"text/xml",c+d*m,e+d*m,0,0,p.name)}))}else B(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==p.type){var D=H?null:this.extractGraphModelFromPng(b.target.result);if(null!=D&&0<D.length){var y=new Image;y.src=b.target.result;B(d,mxUtils.bind(this,function(){return k(D,"text/xml",c+d*m,e+d*m,y.width,y.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){B(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=f&&this.isResampleImageSize(p.size,C)?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,C,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){B(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){B(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"),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(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 M=document.createElement("canvas");M.width=m;M.height=q;var G=M.toDataURL();u!==G&&(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(q){if(null!=e)e(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:
+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 u=q.toDataURL();if(u.length<c.length){var M=document.createElement("canvas");M.width=m;M.height=p;var G=M.toDataURL();u!==G&&(c=u,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,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()}},
@@ -3608,11 +3609,11 @@ this.styleInput.value)})),E.appendChild(this.styleInput),this.editor.graph.getSe
this.styleInput?!0:M.apply(this,arguments)}}E=document.getElementById("geInfo");null!=E&&E.parentNode.removeChild(E);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)),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="+
+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,l,!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!=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",
+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 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="&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),
@@ -3636,7 +3637,7 @@ function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.
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 p=f.lastIndexOf("%3E");0<=p&&p<f.length-3&&(f=f.substring(0,p+3))}catch(H){}try{k=d.getElementsByTagName("span"),m=
+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(H){}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(H){}try{if(null!=f&&0<f.length){this.pasteXml(f,g,l,b);try{mxEvent.consume(b)}catch(H){}}else if(!e){var t=this.editor.graph;t.lastPasteXml=null;t.pasteCounter=0}}catch(H){this.handleError(H)}}}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"):
@@ -3661,49 +3662,49 @@ window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh(
pageVisible:d.pageVisible,translate:d.view.translate,bounds:d.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:d.view.scale,page:d.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(){var b=this.editor.graph;b.isEditing()&&b.stopEditing(!b.isInvokesStopCellEditing());var c=window.opener||window.parent;this.editor.modified?this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),b,null,!0,mxUtils.bind(this,function(b){c.postMessage(JSON.stringify({event:"export",
data:Editor.createSvgDataUri(b)}),"*")}),null,null,!0,this.embedExportBackground,1,this.embedExportBorder):c.postMessage(JSON.stringify({event:"exit"}),"*");this.diagramContainer.removeAttribute("data-bounds");Editor.inlineFullscreen=!1;b.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);this.editor.modified=!1;this.fireEvent(new mxEventObject("editInlineStop"))};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=null,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(na){}return b});if("json"==urlParams.proto){var n=!1;try{k=JSON.parse(k)}catch(ja){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 q=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(q.container,300,80,!0,!1);q.init();return}if("draft"==k.action){var t=m(k.xml);this.spinner.stop();q=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),t,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(q.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{q.init()}catch(ja){p.postMessage(JSON.stringify({event:"draft",error:ja.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var u=1==k.enableRecent,v=1==k.enableSearch,
-B=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&!k.templatesOnly&&null!=k.callback){var y=this.getCurrentUser(),O=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!=y?y.id:null,u?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",
+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(na){}return b});if("json"==urlParams.proto){var p=!1;try{k=JSON.parse(k)}catch(ja){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 q=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(q.container,300,80,!0,!1);q.init();return}if("draft"==k.action){var t=m(k.xml);this.spinner.stop();q=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),t,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(q.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{q.init()}catch(ja){n.postMessage(JSON.stringify({event:"draft",error:ja.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var u=1==k.enableRecent,v=1==k.enableSearch,
+B=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&!k.templatesOnly&&null!=k.callback){var y=this.getCurrentUser(),O=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!=y?y.id:null,u?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",
[c],null,b,d)}):null,v?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,B?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(O.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}q=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,u?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,"Network Error!")})}):null,v?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,B?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==k.withoutType);this.showDialog(q.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();b&&this.actions.get("exit").funct()}));q.init();return}if("textContent"==k.action){var da=
-this.getDiagramTextContent();p.postMessage(JSON.stringify({event:"textContent",data:da,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 N=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,
-N):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var Q=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var X=this.editor.graph,F=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=Q;p.postMessage(JSON.stringify(d),
-"*")}),J=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(Q)));X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);F(b)}),A=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var aa=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=A){var b=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());
-for(var d,c=0;c<this.pages.length;c++)if(this.pages[c].getId()==A){d=this.updatePageRoot(this.pages[c]);break}null==d&&(d=this.currentPage);X.getGlobalVariable=function(c){return"page"==c?d.getName():"pagenumber"==c?1:b.apply(this,arguments)};document.body.appendChild(X.container);X.model.setRoot(d.root)}if(null!=k.layerIds){for(var e=X.model,f=e.getChildCells(e.getRoot()),g={},c=0;c<k.layerIds.length;c++)g[k.layerIds[c]]=!0;for(c=0;c<f.length;c++)e.setVisible(f[c],g[f[c].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,
-function(b){J(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){J(null)}),null,null,k.scale,k.transparent,k.shadow,null,X,k.border,null,k.grid,k.keepTheme)});null!=k.xml&&0<k.xml.length?(c=!0,this.setFileData(Q),c=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(aa)},0):aa()):aa()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=A?"&pageId="+A:"")+(null!=k.layerIds&&0<k.layerIds.length?
-"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(Q))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?F("data:image/png;base64,"+b.getText()):J(null)}),mxUtils.bind(this,function(){J(null)}))}}else aa=mxUtils.bind(this,function(){var b=this.createLoadMessage("export");b.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var d=
-this.getXmlFileData();b.xml=mxUtils.getXml(d);b.data=this.getFileData(null,null,!0,null,null,null,d);b.format=k.format}else if("html"==k.format)d=this.editor.getGraphXml(),b.data=this.getHtml(d,this.editor.graph),b.xml=mxUtils.getXml(d),b.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;d=null!=k.background?k.background:this.editor.graph.background;d==mxConstants.NONE&&(d=null);b.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);b.format="svg";var c=mxUtils.bind(this,
-function(d){this.editor.graph.setEnabled(!0);this.spinner.stop();b.data=Editor.createSvgDataUri(d);p.postMessage(JSON.stringify(b),"*")});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(b.xml,this.editor.graph,null,!0,c,null,null,k.embedImages,d,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),d=this.editor.graph.getSvg(d,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(d),this.embedFonts(d,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){c(mxUtils.getXml(b))})):c(mxUtils.getXml(b))}));return}p.postMessage(JSON.stringify(b),"*")}),null!=k.xml&&
-0<k.xml.length?(c=!0,this.setFileData(k.xml),c=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(aa)},0):aa()):aa();return}if("load"==k.action){n=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);if(null!=k.rough){var I=Editor.sketchMode;
-this.doSetSketchMode(k.rough);I!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=k.dark&&(I=Editor.darkMode,this.doSetDarkMode(k.dark),I!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=k.border&&(this.embedExportBorder=k.border);var W=this.embedExportBorder;null!=k.background&&(this.embedExportBackground=k.background);null!=k.rect&&(this.diagramContainer.style.border="2px solid #295fcc",this.diagramContainer.style.top=k.rect.top+"px",this.diagramContainer.style.left=
-k.rect.left+"px",this.diagramContainer.style.height=k.rect.height+"px",this.diagramContainer.style.width=k.rect.width+"px",this.diagramContainer.style.bottom="",this.diagramContainer.style.right="",l=mxUtils.bind(this,function(){var b=this.editor.graph,d=b.maxFitScale;b.maxFitScale=k.maxFitScale;b.fit(2*W);b.maxFitScale=d;b.container.scrollTop-=2*W;b.container.scrollLeft-=2*W;this.fireEvent(new mxEventObject("editInlineStart","data",[k]))}));null!=k.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=
-k.noExitBtn);null!=k.title&&null!=this.buttonContainer&&(t=document.createElement("span"),mxUtils.write(t,k.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(t),this.embedFilenameSpan=t);try{k.libs&&this.sidebar.showEntries(k.libs)}catch(ja){}k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.descriptor?k.descriptor:k.xml}else{if("merge"==k.action){var ba=this.getCurrentFile();null!=ba&&(t=m(k.xml),
-null!=t&&""!=t&&ba.mergeFile(new LocalFile(this,t),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(ja){this.handleError(ja)}}var oa=
-mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),fa=mxUtils.bind(this,function(f,k){c=!0;try{b(f,k,null,n)}catch(ka){this.handleError(ka)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");g=oa();e&&null==d&&(d=mxUtils.bind(this,function(b,d){var e=oa();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 m=this.createLoadMessage("load");m.xml=f;p.postMessage(JSON.stringify(m),"*")}null!=l&&l()});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(m="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(b){fa(b,f)},mxUtils.bind(this,function(b){this.handleError(b)}),m)):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)&&fa(b.responseText,f)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(b){fa(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):
-null==k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=m(k),fa(k,f)):this.loadDescriptor(k,mxUtils.bind(this,function(b){fa(oa(),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&&"1"!=urlParams.embedInline){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"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"!=
+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,u?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,"Network Error!")})}):null,v?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,B?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==k.withoutType);this.showDialog(q.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();b&&this.actions.get("exit").funct()}));q.init();return}if("textContent"==k.action){var da=
+this.getDiagramTextContent();n.postMessage(JSON.stringify({event:"textContent",data:da,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 N=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,
+N):this.spinner.stop();return}if("exit"==k.action)this.actions.get("exit").funct();else{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 Q=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var X=this.editor.graph,F=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=Q;n.postMessage(JSON.stringify(d),"*")}),J=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(Q)));X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);F(b)}),A=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var aa=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=
+A){var b=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());for(var d,c=0;c<this.pages.length;c++)if(this.pages[c].getId()==A){d=this.updatePageRoot(this.pages[c]);break}null==d&&(d=this.currentPage);X.getGlobalVariable=function(c){return"page"==c?d.getName():"pagenumber"==c?1:b.apply(this,arguments)};document.body.appendChild(X.container);X.model.setRoot(d.root)}if(null!=k.layerIds){for(var e=X.model,f=e.getChildCells(e.getRoot()),g={},c=0;c<k.layerIds.length;c++)g[k.layerIds[c]]=
+!0;for(c=0;c<f.length;c++)e.setVisible(f[c],g[f[c].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){J(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){J(null)}),null,null,k.scale,k.transparent,k.shadow,null,X,k.border,null,k.grid,k.keepTheme)});null!=k.xml&&0<k.xml.length?(c=!0,this.setFileData(Q),c=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(aa)},0):aa()):aa()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+
+("xmlpng"==k.format?"1":"0")+(null!=A?"&pageId="+A:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(Q))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?F("data:image/png;base64,"+b.getText()):J(null)}),mxUtils.bind(this,function(){J(null)}))}}else aa=mxUtils.bind(this,function(){var b=this.createLoadMessage("export");b.message=k;if("html2"==
+k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var d=this.getXmlFileData();b.xml=mxUtils.getXml(d);b.data=this.getFileData(null,null,!0,null,null,null,d);b.format=k.format}else if("html"==k.format)d=this.editor.getGraphXml(),b.data=this.getHtml(d,this.editor.graph),b.xml=mxUtils.getXml(d),b.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;d=null!=k.background?k.background:this.editor.graph.background;d==mxConstants.NONE&&(d=null);b.xml=this.getFileData(!0,
+null,null,null,null,null,null,null,null,!1);b.format="svg";var c=mxUtils.bind(this,function(d){this.editor.graph.setEnabled(!0);this.spinner.stop();b.data=Editor.createSvgDataUri(d);n.postMessage(JSON.stringify(b),"*")});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(b.xml,this.editor.graph,null,!0,c,null,null,k.embedImages,d,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),d=this.editor.graph.getSvg(d,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(d),this.embedFonts(d,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){c(mxUtils.getXml(b))})):
+c(mxUtils.getXml(b))}));return}n.postMessage(JSON.stringify(b),"*")}),null!=k.xml&&0<k.xml.length?(c=!0,this.setFileData(k.xml),c=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(aa)},0):aa()):aa();return}if("load"==k.action){p=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);if(null!=k.rough){var I=Editor.sketchMode;this.doSetSketchMode(k.rough);I!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=k.dark&&(I=Editor.darkMode,this.doSetDarkMode(k.dark),I!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=k.border&&(this.embedExportBorder=k.border);var W=this.embedExportBorder;null!=k.background&&(this.embedExportBackground=k.background);null!=k.rect&&(this.diagramContainer.style.border=
+"2px solid #295fcc",this.diagramContainer.style.top=k.rect.top+"px",this.diagramContainer.style.left=k.rect.left+"px",this.diagramContainer.style.height=k.rect.height+"px",this.diagramContainer.style.width=k.rect.width+"px",this.diagramContainer.style.bottom="",this.diagramContainer.style.right="",l=mxUtils.bind(this,function(){var b=this.editor.graph,d=b.maxFitScale;b.maxFitScale=k.maxFitScale;b.fit(2*W);b.maxFitScale=d;b.container.scrollTop-=2*W;b.container.scrollLeft-=2*W;this.fireEvent(new mxEventObject("editInlineStart",
+"data",[k]))}));null!=k.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=k.noExitBtn);null!=k.title&&null!=this.buttonContainer&&(t=document.createElement("span"),mxUtils.write(t,k.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(t),this.embedFilenameSpan=t);try{k.libs&&this.sidebar.showEntries(k.libs)}catch(ja){}k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.descriptor?k.descriptor:
+k.xml}else{if("merge"==k.action){var ba=this.getCurrentFile();null!=ba&&(t=m(k.xml),null!=t&&""!=t&&ba.mergeFile(new LocalFile(this,t),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(ja){this.handleError(ja)}}var oa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),fa=mxUtils.bind(this,function(f,k){c=!0;try{b(f,k,null,p)}catch(ka){this.handleError(ka)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");g=oa();e&&null==d&&(d=mxUtils.bind(this,function(b,d){var e=oa();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 m=this.createLoadMessage("load");m.xml=f;n.postMessage(JSON.stringify(m),"*")}null!=l&&l()});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(m="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(b){fa(b,f)},mxUtils.bind(this,function(b){this.handleError(b)}),
+m)):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)&&fa(b.responseText,f)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(b){fa(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):
+null==k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=m(k),fa(k,f)):this.loadDescriptor(k,mxUtils.bind(this,function(b){fa(oa(),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&&"1"!=urlParams.embedInline){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"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||"1"==urlParams.atlas?"42px":"52px"}};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=[],k={};if(0<d.length){var p={},t=null,x=null,C=null,H=null,D=null,E=null,M="whiteSpace=wrap;html=1;",G=null,K=null,B="",L="auto",O="auto",da=null,N=null,Q=40,X=40,F=100,J=0,A=this.editor.graph;A.getGraphBounds();for(var aa=function(){null!=c?c(qa):(A.setSelectionCells(qa),
+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=[],k={};if(0<d.length){var n={},t=null,x=null,C=null,H=null,D=null,E=null,M="whiteSpace=wrap;html=1;",G=null,K=null,B="",L="auto",O="auto",da=null,N=null,Q=40,X=40,F=100,J=0,A=this.editor.graph;A.getGraphBounds();for(var aa=function(){null!=c?c(qa):(A.setSelectionCells(qa),
A.scrollCellToVisible(A.getSelectionCell()))},I=A.getFreeInsertPoint(),W=I.x,ba=I.y,I=ba,oa=null,fa="auto",K=null,ja=[],na=null,pa=null,ka=0;ka<d.length&&"#"==d[ka].charAt(0);){b=d[ka];for(ka++;ka<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[ka].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[ka].substring(1)),ka++;if("#"!=b.charAt(1)){var Y=b.indexOf(":");if(0<Y){var Z=mxUtils.trim(b.substring(1,Y)),R=mxUtils.trim(b.substring(Y+1));"label"==Z?oa=A.sanitizeHtml(R):"labelname"==Z&&0<R.length&&
"-"!=R?D=R:"labels"==Z&&0<R.length&&"-"!=R?E=JSON.parse(R):"style"==Z?x=R:"parentstyle"==Z?M=R:"stylename"==Z&&0<R.length&&"-"!=R?H=R:"styles"==Z&&0<R.length&&"-"!=R?C=JSON.parse(R):"vars"==Z&&0<R.length&&"-"!=R?t=JSON.parse(R):"identity"==Z&&0<R.length&&"-"!=R?G=R:"parent"==Z&&0<R.length&&"-"!=R?K=R:"namespace"==Z&&0<R.length&&"-"!=R?B=R:"width"==Z?L=R:"height"==Z?O=R:"left"==Z&&0<R.length?da=R:"top"==Z&&0<R.length?N=R:"ignore"==Z?pa=R.split(","):"connect"==Z?ja.push(JSON.parse(R)):"link"==Z?na=
-R:"padding"==Z?J=parseFloat(R):"edgespacing"==Z?Q=parseFloat(R):"nodespacing"==Z?X=parseFloat(R):"levelspacing"==Z?F=parseFloat(R):"layout"==Z&&(fa=R)}}}if(null==d[ka])throw Error(mxResources.get("invalidOrMissingFile"));for(var sa=this.editor.csvToArray(d[ka]),Z=Y=null,R=[],U=0;U<sa.length;U++)G==sa[U]&&(Y=U),K==sa[U]&&(Z=U),R.push(mxUtils.trim(sa[U]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==oa&&(oa="%"+R[0]+"%");if(null!=ja)for(var T=0;T<ja.length;T++)null==p[ja[T].to]&&
-(p[ja[T].to]={});G=[];for(U=ka+1;U<d.length;U++){var ma=this.editor.csvToArray(d[U]);if(null==ma){var va=40<d[U].length?d[U].substring(0,40)+"...":d[U];throw Error(va+" ("+U+"):\n"+mxResources.get("containsValidationErrors"));}0<ma.length&&G.push(ma)}A.model.beginUpdate();try{for(U=0;U<G.length;U++){var ma=G[U],S=null,ea=null!=Y?B+ma[Y]:null;null!=ea&&(S=A.model.getCell(ea));var d=null!=S,ha=new mxCell(oa,new mxGeometry(W,I,0,0),x||"whiteSpace=wrap;html=1;");ha.vertex=!0;ha.id=ea;for(var ia=0;ia<
+R:"padding"==Z?J=parseFloat(R):"edgespacing"==Z?Q=parseFloat(R):"nodespacing"==Z?X=parseFloat(R):"levelspacing"==Z?F=parseFloat(R):"layout"==Z&&(fa=R)}}}if(null==d[ka])throw Error(mxResources.get("invalidOrMissingFile"));for(var sa=this.editor.csvToArray(d[ka]),Z=Y=null,R=[],U=0;U<sa.length;U++)G==sa[U]&&(Y=U),K==sa[U]&&(Z=U),R.push(mxUtils.trim(sa[U]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==oa&&(oa="%"+R[0]+"%");if(null!=ja)for(var T=0;T<ja.length;T++)null==n[ja[T].to]&&
+(n[ja[T].to]={});G=[];for(U=ka+1;U<d.length;U++){var ma=this.editor.csvToArray(d[U]);if(null==ma){var va=40<d[U].length?d[U].substring(0,40)+"...":d[U];throw Error(va+" ("+U+"):\n"+mxResources.get("containsValidationErrors"));}0<ma.length&&G.push(ma)}A.model.beginUpdate();try{for(U=0;U<G.length;U++){var ma=G[U],S=null,ea=null!=Y?B+ma[Y]:null;null!=ea&&(S=A.model.getCell(ea));var d=null!=S,ha=new mxCell(oa,new mxGeometry(W,I,0,0),x||"whiteSpace=wrap;html=1;");ha.vertex=!0;ha.id=ea;for(var ia=0;ia<
ma.length;ia++)A.setAttributeForCell(ha,R[ia],ma[ia]);if(null!=D&&null!=E){var la=E[ha.getAttribute(D)];null!=la&&A.labelChanged(ha,la)}if(null!=H&&null!=C){var ta=C[ha.getAttribute(H)];null!=ta&&(ha.style=ta)}A.setAttributeForCell(ha,"placeholders","1");ha.style=A.replacePlaceholders(ha,ha.style,t);d?(A.model.setValue(S,ha.value),A.model.setStyle(S,ha.style),0>mxUtils.indexOf(g,S)&&g.push(S),A.fireEvent(new mxEventObject("cellsInserted","cells",[S]))):A.fireEvent(new mxEventObject("cellsInserted",
-"cells",[ha]));S=ha;if(!d)for(T=0;T<ja.length;T++)p[ja[T].to][S.getAttribute(ja[T].to)]=S;null!=na&&"link"!=na&&(A.setLinkForCell(S,S.getAttribute(na)),A.setAttributeForCell(S,na,null));var P=this.editor.graph.getPreferredSizeForCell(S),K=null!=Z?A.model.getCell(B+ma[Z]):null;if(S.vertex){va=null!=K?0:W;ka=null!=K?0:ba;null!=da&&null!=S.getAttribute(da)&&(S.geometry.x=va+parseFloat(S.getAttribute(da)));null!=N&&null!=S.getAttribute(N)&&(S.geometry.y=ka+parseFloat(S.getAttribute(N)));var ca="@"==L.charAt(0)?
+"cells",[ha]));S=ha;if(!d)for(T=0;T<ja.length;T++)n[ja[T].to][S.getAttribute(ja[T].to)]=S;null!=na&&"link"!=na&&(A.setLinkForCell(S,S.getAttribute(na)),A.setAttributeForCell(S,na,null));var P=this.editor.graph.getPreferredSizeForCell(S),K=null!=Z?A.model.getCell(B+ma[Z]):null;if(S.vertex){va=null!=K?0:W;ka=null!=K?0:ba;null!=da&&null!=S.getAttribute(da)&&(S.geometry.x=va+parseFloat(S.getAttribute(da)));null!=N&&null!=S.getAttribute(N)&&(S.geometry.y=ka+parseFloat(S.getAttribute(N)));var ca="@"==L.charAt(0)?
S.getAttribute(L.substring(1)):null;S.geometry.width=null!=ca&&"auto"!=ca?parseFloat(S.getAttribute(L.substring(1))):"auto"==L||"auto"==ca?P.width+J:parseFloat(L);var wa="@"==O.charAt(0)?S.getAttribute(O.substring(1)):null;S.geometry.height=null!=wa&&"auto"!=wa?parseFloat(wa):"auto"==O||"auto"==wa?P.height+J:parseFloat(O);I+=S.geometry.height+X}d?(null==k[ea]&&(k[ea]=[]),k[ea].push(S)):(e.push(S),null!=K?(K.style=A.replacePlaceholders(K,M,t),A.addCell(S,K),f.push(K)):g.push(A.addCell(S)))}for(U=0;U<
-f.length;U++)ca="@"==L.charAt(0)?f[U].getAttribute(L.substring(1)):null,wa="@"==O.charAt(0)?f[U].getAttribute(O.substring(1)):null,"auto"!=L&&"auto"!=ca||"auto"!=O&&"auto"!=wa||A.updateGroupBounds([f[U]],J,!0);for(var ya=g.slice(),qa=g.slice(),T=0;T<ja.length;T++)for(var za=ja[T],U=0;U<e.length;U++){var S=e[U],Aa=mxUtils.bind(this,function(b,d,c){var e=d.getAttribute(c.from);if(null!=e&&""!=e)for(var e=e.split(","),f=0;f<e.length;f++){var g=p[c.to][e[f]];if(null!=g){var k=c.label;null!=c.fromlabel&&
+f.length;U++)ca="@"==L.charAt(0)?f[U].getAttribute(L.substring(1)):null,wa="@"==O.charAt(0)?f[U].getAttribute(O.substring(1)):null,"auto"!=L&&"auto"!=ca||"auto"!=O&&"auto"!=wa||A.updateGroupBounds([f[U]],J,!0);for(var ya=g.slice(),qa=g.slice(),T=0;T<ja.length;T++)for(var za=ja[T],U=0;U<e.length;U++){var S=e[U],Aa=mxUtils.bind(this,function(b,d,c){var e=d.getAttribute(c.from);if(null!=e&&""!=e)for(var e=e.split(","),f=0;f<e.length;f++){var g=n[c.to][e[f]];if(null!=g){var k=c.label;null!=c.fromlabel&&
(k=(d.getAttribute(c.fromlabel)||"")+(k||""));null!=c.sourcelabel&&(k=A.replacePlaceholders(d,c.sourcelabel,t)+(k||""));null!=c.tolabel&&(k=(k||"")+(g.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(k=(k||"")+A.replacePlaceholders(g,c.targetlabel,t));var l="target"==c.placeholders==!c.invert?g:b,l=null!=c.style?A.replacePlaceholders(l,c.style,t):A.createCurrentEdgeStyle(),k=A.insertEdge(null,null,k||"",c.invert?g:b,c.invert?b:g,l);if(null!=c.labels)for(l=0;l<c.labels.length;l++){var m=c.labels[l],
-n=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?m.y:0,0,0),"resizable=0;html=1;");n.vertex=!0;n.connectable=!1;n.geometry.relative=!0;null!=m.placeholders&&(n.value=A.replacePlaceholders("target"==m.placeholders==!c.invert?g:b,n.value,t));if(null!=m.dx||null!=m.dy)n.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);k.insert(n)}qa.push(k);mxUtils.remove(c.invert?b:g,ya)}}});Aa(S,S,za);if(null!=k[S.id])for(ia=0;ia<k[S.id].length;ia++)Aa(S,k[S.id][ia],za)}if(null!=pa)for(U=
+p=new mxCell(m.label||l,new mxGeometry(null!=m.x?m.x:0,null!=m.y?m.y:0,0,0),"resizable=0;html=1;");p.vertex=!0;p.connectable=!1;p.geometry.relative=!0;null!=m.placeholders&&(p.value=A.replacePlaceholders("target"==m.placeholders==!c.invert?g:b,p.value,t));if(null!=m.dx||null!=m.dy)p.geometry.offset=new mxPoint(null!=m.dx?m.dx:0,null!=m.dy?m.dy:0);k.insert(p)}qa.push(k);mxUtils.remove(c.invert?b:g,ya)}}});Aa(S,S,za);if(null!=k[S.id])for(ia=0;ia<k[S.id].length;ia++)Aa(S,k[S.id][ia],za)}if(null!=pa)for(U=
0;U<e.length;U++)for(S=e[U],ia=0;ia<pa.length;ia++)A.setAttributeForCell(S,mxUtils.trim(pa[ia]),null);if(0<g.length){var Da=new mxParallelEdgeLayout(A);Da.spacing=Q;Da.checkOverlap=!0;var Ea=function(){0<Da.spacing&&Da.execute(A.getDefaultParent());for(var b=0;b<g.length;b++){var d=A.getCellGeometry(g[b]);d.x=Math.round(A.snap(d.x));d.y=Math.round(A.snap(d.y));"auto"==L&&(d.width=Math.round(A.snap(d.width)));"auto"==O&&(d.height=Math.round(A.snap(d.height)))}};if("["==fa.charAt(0)){var Ka=aa;A.view.validate();
this.executeLayoutList(JSON.parse(fa),function(){Ea();Ka()});aa=null}else if("circle"==fa){var Ba=new mxCircleLayout(A);Ba.disableEdgeStyle=!1;Ba.resetEdges=!1;var Ha=Ba.isVertexIgnored;Ba.isVertexIgnored=function(b){return Ha.apply(this,arguments)||0>mxUtils.indexOf(g,b)};this.executeLayout(function(){Ba.execute(A.getDefaultParent());Ea()},!0,aa);aa=null}else if("horizontaltree"==fa||"verticaltree"==fa||"auto"==fa&&qa.length==2*g.length-1&&1==ya.length){A.view.validate();var Fa=new mxCompactTreeLayout(A,
"horizontaltree"==fa);Fa.levelDistance=X;Fa.edgeRouting=!1;Fa.resetEdges=!1;this.executeLayout(function(){Fa.execute(A.getDefaultParent(),0<ya.length?ya[0]:null)},!0,aa);aa=null}else if("horizontalflow"==fa||"verticalflow"==fa||"auto"==fa&&1==ya.length){A.view.validate();var V=new mxHierarchicalLayout(A,"horizontalflow"==fa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);V.intraCellSpacing=X;V.parallelEdgeSpacing=Q;V.interRankCellSpacing=F;V.disableEdgeStyle=!1;this.executeLayout(function(){V.execute(A.getDefaultParent(),
@@ -3713,66 +3714,66 @@ e;for(e in urlParams)0>mxUtils.indexOf(c,e)&&(b=0==d?b+"?":b+"&",null!=urlParams
d++;null!=this.gitHub&&d++;null!=this.gitLab&&d++;null!=this.notion&&d++;b&&isLocalStorage&&"1"==urlParams.browser&&d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();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 p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);var b=this.editor.graph,
+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!=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,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,c){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(c||"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+=
+(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,e,g,k,n,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,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()};v&&(q.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});b.saveRequest(c,e,function(b,c){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(c||"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,v,t):b.exportImage(k,!1,!0,!1,!1,n,!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 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 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"))+
+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 d=0;d<b.length;d++){var e=b[d];k[e.id]&&(c[e.id]=e);var f=this.addCheckbox(g,e.title,k[e.id]);(function(b,d){mxEvent.addListener(d,"change",function(){this.checked?c[b.id]=b:delete c[b.id]})})(e,f)}},mxUtils.bind(this,function(b){g.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"));g.appendChild(c)}));
d.appendChild(g);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==k[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(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){b--;0==b&&this.spinner.stop();this.handleError(null,
mxResources.get("errorLoadingFile"))}))})(c[d]));for(d in k)c[d]||this.closeLibrary(new RemoteLibrary(this,null,k[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,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(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 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);
+"*")});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(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(B){console.log(B)}}),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(B){console.log(B)}});b=mxUtils.bind(this,function(b){try{if(b.source==c.contentWindow){var g=
-{};try{g=JSON.parse(b.data)}catch(L){}"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]?p(g.resp[0]):l())}}catch(L){console.log(L)}});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,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(d){null==d||".scratchpad"==b&&d==this.emptyLibraryXml?c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(B){console.log(B)}}),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(B){console.log(B)}});b=mxUtils.bind(this,function(b){try{if(b.source==c.contentWindow){var g=
+{};try{g=JSON.parse(b.data)}catch(L){}"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(L){console.log(L)}});window.addEventListener("message",b)}})));b(d);d.onversionchange=
+function(){d.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(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(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,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();
+f.onsuccess=function(){b(f.result)};f.onerror=c}catch(q){null!=c&&c(q)}}),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,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,C,H,D,E,M,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,g,k,p,t,v,
+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,v){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(b,c,e,g,k,n,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,n,t,v,y,x,C,H,D,E,M,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,g,k,n,t,v,
y,x,C,H,D,E,M,G)};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,p){function t(){for(var b=H.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==H&&c++;D.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 m(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function q(b){b.style.border="";b.removeChild(b.busyImg)}function n(c,e,g,k,p){function B(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)});X.appendChild(f);e&&(f.style.display="none")}function x(){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=Q;b(c);return{pdiv:e,replies:d}}function N(e,f,g,p,t){function v(){l(D);c.addReply(N,function(b){N.id=b;c.replies.push(N);q(D);g&&g()},function(c){u();m(D);b.handleError(c,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},p,t)}function u(){d(N,D,function(b){v()},!0)}var B=x().pdiv,N=b.newComment(e,b.getCurrentUser());N.pCommentId=c.id;null==c.replies&&(c.replies=[]);var D=n(N,c.replies,B,k+1);f?u():v()}if(p||!c.isResolved){D.style.display="none";var Q=document.createElement("div");Q.className="geCommentContainer";Q.setAttribute("data-commentId",c.id);Q.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(Q.style.backgroundColor="ghostWhite");
+var CommentsWindow=function(b,c,e,k,g,n){function t(){for(var b=H.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==H&&c++;D.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 B(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)});X.appendChild(f);e&&(f.style.display="none")}function x(){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=Q;b(c);return{pdiv:e,replies:d}}function N(e,f,g,n,t){function v(){l(D);c.addReply(N,function(b){N.id=b;c.replies.push(N);p(D);g&&g()},function(c){u();m(D);b.handleError(c,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},n,t)}function u(){d(N,D,function(b){v()},!0)}var B=x().pdiv,N=b.newComment(e,b.getCurrentUser());N.pCommentId=c.id;null==c.replies&&(c.replies=[]);var D=q(N,c.replies,B,k+1);f?u():v()}if(n||!c.isResolved){D.style.display="none";var Q=document.createElement("div");Q.className="geCommentContainer";Q.setAttribute("data-commentId",c.id);Q.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(Q.style.backgroundColor="ghostWhite");
var E=document.createElement("div");E.className="geCommentHeader";var C=document.createElement("img");C.className="geCommentUserImg";C.src=c.user.pictureUrl||Editor.userImage;E.appendChild(C);C=document.createElement("div");C.className="geCommentHeaderTxt";E.appendChild(C);var L=document.createElement("div");L.className="geCommentUsername";mxUtils.write(L,c.user.displayName||"");C.appendChild(L);L=document.createElement("div");L.className="geCommentDate";L.setAttribute("data-commentId",c.id);f(c,
L);C.appendChild(L);Q.appendChild(E);E=document.createElement("div");E.className="geCommentTxt";mxUtils.write(E,c.content||"");Q.appendChild(E);c.isLocked&&(Q.style.opacity="0.5");E=document.createElement("div");E.className="geCommentActions";var X=document.createElement("ul");X.className="geCommentActionsList";E.appendChild(X);u||c.isLocked||0!=k&&!v||B(mxResources.get("reply"),function(){N("",!0)},c.isResolved);C=b.getCurrentUser();null==C||C.id!=c.user.id||u||c.isLocked||(B(mxResources.get("edit"),
-function(){function e(){d(c,Q,function(){l(Q);c.editComment(c.content,function(){q(Q)},function(c){m(Q);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),B(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(Q);c.deleteComment(function(b){if(!0===b){b=Q.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=Q.querySelectorAll(".geCommentAction");for(b=
-0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);q(Q);Q.style.opacity="0.5"}else{d=x(c).replies;for(b=0;b<d.length;b++)H.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}D.style.display=0==H.getElementsByTagName("div").length?"block":"none"}},function(c){m(Q);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=k||B(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
+function(){function e(){d(c,Q,function(){l(Q);c.editComment(c.content,function(){p(Q)},function(c){m(Q);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),B(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(Q);c.deleteComment(function(b){if(!0===b){b=Q.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=Q.querySelectorAll(".geCommentAction");for(b=
+0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);p(Q);Q.style.opacity="0.5"}else{d=x(c).replies;for(b=0;b<d.length;b++)H.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}D.style.display=0==H.getElementsByTagName("div").length?"block":"none"}},function(c){m(Q);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=k||B(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=x(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);G||(f[k].style.display="none")}t()}c.isResolved?N(mxResources.get("reOpened")+": ",!0,
-d,!1,!0):N(mxResources.get("markedAsResolved"),!1,d,!0)});Q.appendChild(E);null!=g?H.insertBefore(Q,g.nextSibling):H.appendChild(Q);for(g=0;null!=c.replies&&g<c.replies.length;g++)E=c.replies[g],E.isResolved=c.isResolved,n(E,c.replies,null,k+1,p);null!=y&&(y.comment.id==c.id?(p=c.content,c.content=y.comment.content,d(c,Q,y.saveCallback,y.deleteOnCancel),c.content=p):null==y.comment.id&&y.comment.pCommentId==c.id&&(H.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return Q}}
+d,!1,!0):N(mxResources.get("markedAsResolved"),!1,d,!0)});Q.appendChild(E);null!=g?H.insertBefore(Q,g.nextSibling):H.appendChild(Q);for(g=0;null!=c.replies&&g<c.replies.length;g++)E=c.replies[g],E.isResolved=c.isResolved,q(E,c.replies,null,k+1,n);null!=y&&(y.comment.id==c.id?(n=c.content,c.content=y.comment.content,d(c,Q,y.saveCallback,y.deleteOnCancel),c.content=n):null==y.comment.id&&y.comment.pCommentId==c.id&&(H.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return Q}}
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 C=EditorUi.compactUi?"26px":"30px",H=document.createElement("div");H.className="geCommentsList";H.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";H.style.bottom=parseInt(C)+7+"px";x.appendChild(H);var D=document.createElement("span");D.style.cssText="display:none;padding-top:10px;text-align:center;";
mxUtils.write(D,mxResources.get("noCommentsFound"));var E=document.createElement("div");E.className="geToolbarContainer geCommentsToolbar";E.style.height=C;E.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";E.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C=document.createElement("a");C.className="geButton";if(!u){var M=C.cloneNode();M.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';M.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(M,"click",function(c){function e(){d(f,g,function(c){l(g);b.addComment(c,function(b){c.id=b;K.push(c);q(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=n(f,K,null,0);e();c.preventDefault();mxEvent.consume(c)});E.appendChild(M)}M=C.cloneNode();M.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';M.setAttribute("title",mxResources.get("showResolved"));
+"...");mxEvent.addListener(M,"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)});E.appendChild(M)}M=C.cloneNode();M.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';M.setAttribute("title",mxResources.get("showResolved"));
var G=!1;Editor.isDarkMode()&&(M.style.filter="invert(100%)");mxEvent.addListener(M,"click",function(b){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";B();b.preventDefault();mxEvent.consume(b)});E.appendChild(M);b.commentsRefreshNeeded()&&(M=C.cloneNode(),M.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',M.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(M.style.filter="invert(100%)"),mxEvent.addListener(M,"click",function(b){B();
-b.preventDefault();mxEvent.consume(b)}),E.appendChild(M));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(C.style.filter="invert(100%)"),mxEvent.addListener(C,"click",function(b){p();b.preventDefault();mxEvent.consume(b)}),E.appendChild(C));x.appendChild(E);var K=[],B=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);
+b.preventDefault();mxEvent.consume(b)}),E.appendChild(M));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(C.style.filter="invert(100%)"),mxEvent.addListener(C,"click",function(b){n();b.preventDefault();mxEvent.consume(b)}),E.appendChild(C));x.appendChild(E);var K=[],B=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)}H.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)});H.innerHTML="";H.appendChild(D);D.style.display="block";K=b;for(b=0;b<K.length;b++)c(K[b].replies),n(K[b],K,null,0,G);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(H.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
+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)});H.innerHTML="";H.appendChild(D);D.style.display="block";K=b;for(b=0;b<K.length;b++)c(K[b].replies),q(K[b],K,null,0,G);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(H.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
": "+b.message:""));this.hasError=!0})):H.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});B();this.refreshComments=B;E=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=H.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(E,6E4);this.refreshCommentsTime=E;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 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()}},ConfirmDialog=function(b,c,e,
-k,g,p,t,d,f,l,m){var q=document.createElement("div");q.style.textAlign="center";m=null!=m?m:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=m+"px";n.style.lineHeight="1.2em";mxUtils.write(n,c);q.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),q.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);q.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),q.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=q};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,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 u=document.createElement("input");u.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=k&&k(u.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 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(n);p.appendChild(l);f?(l.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),q.appendChild(g),p.appendChild(q),mxEvent.addListener(g,
+"click",function(b){u.checked=!u.checked;mxEvent.consume(b)})):l.style.marginTop="12px";this.init=function(){v.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")};
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))}
@@ -3782,15 +3783,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,g=this.createTemporaryGraph(e.getStylesheet());g.defaultForegroundColor=e.defaultForegroundColor;var p=this.getPageIndex(null!=c?c:this.currentPage);g.getGlobalVariable=function(b){return"pagenumber"==b?p+1:"page"==b&&null!=c?c.getName():k.apply(this,arguments)};document.body.appendChild(g.container);this.updatePageRoot(b);g.model.setRoot(b.root);b=g.getSvg(null,null,null,null,null,null,null,
+EditorUi.prototype.getImageForPage=function(b,c,e){e=null!=e?e:this.editor.graph;var k=e.getGlobalVariable,g=this.createTemporaryGraph(e.getStylesheet());g.defaultForegroundColor=e.defaultForegroundColor;var n=this.getPageIndex(null!=c?c:this.currentPage);g.getGlobalVariable=function(b){return"pagenumber"==b?n+1:"page"==b&&null!=c?c.getName():k.apply(this,arguments)};document.body.appendChild(g.container);this.updatePageRoot(b);g.model.setRoot(b.root);b=g.getSvg(null,null,null,null,null,null,null,
null,null,null,null,!0);e=g.getGraphBounds();document.body.removeChild(g.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),e.width,e.height,e.x,e.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")),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:
+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:
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",
@@ -3806,17 +3807,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(p){this.handleError(p)}};
+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.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 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.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.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,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()?Editor.darkColor:"#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);
+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()?Editor.darkColor:"#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);
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()};
@@ -3826,11 +3827,11 @@ 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),p=mxEvent.getClientY(b);c.popup(e,p,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),n=mxEvent.getClientY(b);c.popup(e,n,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"),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.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.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"),
@@ -3840,33 +3841,33 @@ f=new EmbedDialog(this,this.getLinkForPage(b,c,f));this.showDialog(f.container,4
(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,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=
+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=
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"==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 B=v.model.getTerminal(q[u],!1);if(k==d(B)){var x=v.view.getState(B);B!=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(B=v.model.getTerminal(q[u],!1),k==d(B)&&(x=v.view.getState(B),B!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY()))){var D=[];v.traverse(x.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&D.push(c);(null==c||d)&&D.push(b);return null==c||d});v.moveCells(D,(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 m(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(pa){}}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,B=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)/B-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)/B-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)/B-u.y+-n.y+10);return v.addCells(k,e)}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 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=q(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||
+!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),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(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 B=v.model.getTerminal(q[u],!1);if(k==d(B)){var x=v.view.getState(B);B!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY())&&mxUtils.intersects(p,x)&&(f=10+Math.max(f,(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:f=0;for(u=0;u<q.length;u++)if(B=v.model.getTerminal(q[u],!1),k==d(B)&&(x=v.view.getState(B),B!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY()))){var D=[];v.traverse(x.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&D.push(c);(null==c||d)&&D.push(b);return null==c||d});v.moveCells(D,(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,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(f,g)}finally{v.model.endUpdate()}}function m(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),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(pa){}}var f=v.getOutgoingTreeEdges(b),p=e.geometry,l=[];v.view.currentRoot==e&&(p=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,B=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)/B-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)/B-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)/B-u.y+-p.y+10);return v.addCells(k,e)}finally{v.model.endUpdate()}}function p(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 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?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=p(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 C=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 C.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 H=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=H.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 D=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 B=v.view.getState(p);null!=B&&(d=(B.getCenterX()-u.getCenterX())/v.view.scale,e=(B.getCenterY()-u.getCenterY())/v.view.scale)}}}}m=D.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 E=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
+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 D=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 B=v.view.getState(n);null!=B&&(d=(B.getCenterX()-u.getCenterX())/v.view.scale,e=(B.getCenterY()-u.getCenterY())/v.view.scale)}}}}m=D.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 E=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
function(c,d,e,f){var g=v.model,k=null;g.beginUpdate();try{if(k=E.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 M={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)?l(v.getSelectionCell()):m(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=M[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(F){u.handleError(F)}mxEvent.isConsumed(c)||G.apply(this,arguments)};var K=v.connectVertex;v.connectVertex=function(c,e,g,k,p,n,q){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=d(c),B=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return u==e||0==t.length?m(c,e):B==x?l(c):f(c,e!=mxConstants.DIRECTION_NORTH&&e!=mxConstants.DIRECTION_WEST)}return K.apply(this,arguments)};v.getSubtree=function(d){var e=
+v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=M[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(q(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(q(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(c))}}catch(F){u.handleError(F)}mxEvent.isConsumed(c)||G.apply(this,arguments)};var K=v.connectVertex;v.connectVertex=function(c,e,g,k,n,p,q){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=d(c),B=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return u==e||0==t.length?m(c,e):B==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 B=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){B.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;u.hoverIcons.reset();mxEvent.consume(b)})))};var L=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){L.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var O=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){O.apply(this,
@@ -3875,9 +3876,9 @@ function(){var b=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimla
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 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 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);q.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(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",
+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 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(q);b.insert(v);b.insert(c);b.insert(d);b.insert(g);b.insert(p);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"};');
@@ -3904,7 +3905,7 @@ EditorUi.prototype.setDarkMode=function(b){this.spinner.spin(document.body,mxRes
"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.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";c.defaultForegroundColor=Editor.isDarkMode()?"#f0f0f0":"#000000";c.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";c.graphHandler.previewColor=Editor.isDarkMode()?
"#cccccc":"black";c.defaultPageBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";Graph.prototype.defaultPageBackgroundColor=c.defaultPageBackgroundColor;document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";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()?Editor.darkColor:"white";StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"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;p.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==g.parentNode&&document.getElementsByTagName("head")[0].appendChild(g):null!=g.parentNode&&g.parentNode.removeChild(g)}};Editor.createMinimalCss=
+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;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; }html body .mxCellEditor { color: #f0f0f0; }":
"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()?Editor.darkColor:"#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: "+
@@ -3912,7 +3913,7 @@ function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindo
(Editor.isDarkMode()?Editor.darkColor:"#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()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#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 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;
+(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;
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;";
@@ -3920,8 +3921,8 @@ b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Edit
"1"!=urlParams.embedInline){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){if("0"!=urlParams.saveAndExit){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";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var q=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=q.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","-",
+b.appendChild(c));this.buttonContainer.appendChild(b);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};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"]),"1"==urlParams.embedInline||!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&&
@@ -3934,49 +3935,49 @@ new ParseDialog(d,"Insert from Text");d.showDialog(b.container,620,420,!0,!1);b.
"...",function(){b(d)})).shortcut=d.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!d.isOffline()&&d.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var b=new ParseDialog(d,mxResources.get("plantUml")+"...","plantUml");d.showDialog(b.container,620,420,!0,!1);b.init()}));d.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var b=new ParseDialog(d,mxResources.get("mermaid")+"...","mermaid");d.showDialog(b.container,620,420,!0,!1);
b.init()}));var g=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(b,c){var d=this.editorUi.editor.graph,e=d.getSelectionCell();g.call(this,b,e,null,c);this.addMenuItems(b,["editTooltip"],c);d.model.isVertex(e)&&this.addMenuItems(b,["editGeometry"],c);this.addMenuItems(b,["-","edit"],c)})));this.addPopupMenuCellEditItems=function(b,c,d,e){b.addSeparator();this.addSubmenu("editCell",b,e,mxResources.get("edit"))};this.put("diagram",new Menu(mxUtils.bind(this,function(b,
c){var e=d.getCurrentFile();d.menus.addSubmenu("extras",b,c,mxResources.get("preferences"));b.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(b,"new open - synchronize - save saveAs -".split(" "),c):"1"==urlParams.embed?("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(b,["-","save"],c),("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&d.menus.addMenuItems(b,["saveAndExit"],c),b.addSeparator(c)):d.mode==
-App.MODE_ATLAS?d.menus.addMenuItems(b,["save","synchronize","-"],c):(d.menus.addMenuItems(b,["new"],c),d.menus.addSubmenu("openFrom",b,c),isLocalStorage&&this.addSubmenu("openRecent",b,c),"1"!=urlParams.sketch&&(b.addSeparator(c),null!=e&&e.constructor==DriveFile&&d.menus.addMenuItems(b,["share"],c),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||d.menus.addMenuItems(b,["synchronize"],c)),b.addSeparator(c),d.menus.addSubmenu("save",b,c));d.menus.addSubmenu("exportAs",
-b,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(b,["import"],c):d.menus.addSubmenu("importFrom",b,c);"1"!=urlParams.sketch&&(d.menus.addMenuItems(b,["-","outline"],c),d.commentsSupported()&&d.menus.addMenuItems(b,["comments"],c));d.menus.addMenuItems(b,["-","findReplace","layers","tags"],c);d.menus.addMenuItems(b,["-","pageSetup","pageScale"],c);mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(b,["print"],c);null!=e&&null!=d.fileNode&&"1"!=urlParams.embedInline&&
-(e=null!=e.getTitle()?e.getTitle():d.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["-","properties"]));b.addSeparator(c);d.menus.addSubmenu("help",b,c);"1"==urlParams.embed?"1"!=urlParams.noExitBtn&&d.menus.addMenuItems(b,["-","exit"],c):d.menus.addMenuItems(b,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(b,c){var e=d.getCurrentFile();null!=e&&e.constructor==DriveFile?d.menus.addMenuItems(b,["save","makeCopy","-","rename","moveToFolder"],
-c):(d.menus.addMenuItems(b,["save","saveAs","-","rename"],c),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(b,["upload"],c):d.menus.addMenuItems(b,["makeCopy"],c));"1"!=urlParams.sketch||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||d.menus.addMenuItems(b,["-","synchronize"],c);d.menus.addMenuItems(b,["-","autosave"],c);null!=e&&e.isRevisionHistorySupported()&&d.menus.addMenuItems(b,["-","revisionHistory"],
-c)})));var k=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){k.funct(b,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||d.menus.addMenuItems(b,["publishLink"],c);d.mode!=App.MODE_ATLAS&&(b.addSeparator(c),d.menus.addSubmenu("embed",b,c))})));var l=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(b,c){d.menus.addInsertTableCellItem(b,c)})));var m=this.get("importFrom");this.put("importFrom",new Menu(mxUtils.bind(this,function(b,c){m.funct(b,
-c);this.addMenuItems(b,["editDiagram"],c);"1"==urlParams.sketch&&(b.addSeparator(c),b.addItem(mxResources.get("csv")+"...",null,function(){d.showImportCsvDialog()},c,null,mxUtils.bind(e,e.isEnabled)),d.addInsertMenuItems(b,c,["formatSql","-","fromText","plantUml","mermaid"]))})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&d.menus.addSubmenu("theme",b,c);null!=l&&d.menus.addSubmenu("language",b,c);d.menus.addSubmenu("units",b,c);b.addSeparator(c);d.menus.addMenuItems(b,
-"scrollbars tooltips ruler - copyConnect collapseExpand -".split(" "),c);"1"==urlParams.sketch&&this.addMenuItems(b,["toggleSketchMode"],c);"1"!=urlParams.embedInline&&(this.addMenuItems(b,["toggleDarkMode"],c),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&d.menus.addMenuItems(b,["-","showStartScreen","search","scratchpad"],c),"1"==urlParams.sketch&&null==urlParams.pages&&this.addMenuItems(b,["togglePagesVisible"],c));b.addSeparator(c);d.menus.addMenuItem(b,"configuration",c);!d.isOfflineApp()&&
-isLocalStorage&&d.menus.addMenuItem(b,"plugins",c);this.addMenuItems(b,["-","fullscreen"],c);b.addSeparator(c)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,c){d.menus.addMenuItems(b,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),c)})));mxUtils.bind(this,function(){var b=this.get("insert"),c=b.funct;b.funct=function(b,e){"1"==urlParams.sketch?(d.menus.addMenuItems(b,["insertFreehand"],e),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(b,
-["insertTemplate"],e)):(c.apply(this,arguments),d.menus.addSubmenu("table",b,e),b.addSeparator(e));d.menus.addMenuItems(b,["-","toggleShapes"],e)}})();var n="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),p=function(b,c,e,f){b.addItem(e,null,mxUtils.bind(this,function(){var b=new CreateGraphDialog(d,e,f);d.showDialog(b.container,620,420,!0,!1);b.init()}),c)};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 C=!1;EditorUi.prototype.initFormatWindow=function(){if(!C){C=!0;this.formatWindow.window.setClosable(!1);var b=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){b.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()}))}};var H=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(b,c,d){var e=m.menus.get(b),f=t.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),q);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("+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?p.insertBefore(k,m.statusContainer):p.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),n.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?p.insertBefore(d,m.statusContainer):p.appendChild(d);return d}function k(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(W.style.left=58>I.offsetTop-I.offsetHeight/2?"70px":"10px");else{for(var b=p.firstChild;null!=b;){var c=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=c}q=p.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var b=1E3>e||"1"==urlParams.sketch,k=null;b||(k=d("diagram"));
-c=b?d("diagram",null,Editor.drawLogoImage):null;null!=c&&(k=c);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);c=d("insert",!0,b?A:null);g([c,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<=e&&(g([ea,ha],60),520<=e&&g([wa,640<=e?f("",sa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",sa,Editor.zoomInImage):null,640<=e?f("",U.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",U,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));c=m.menus.get("language");null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e&&"1"!=urlParams.sketch?(null==qa&&(c=t.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.className="geToolbarButton",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="24px 24px",c.style.position=
-"absolute",c.style.height="24px",c.style.width="24px",c.style.zIndex="1",c.style.right="8px",c.style.cursor="pointer",c.style.top="1"==urlParams.embed?"12px":"11px",p.appendChild(c),qa=c),m.buttonContainer.style.paddingRight="34px"):(m.buttonContainer.style.paddingRight="4px",null!=qa&&(qa.parentNode.removeChild(qa),qa=null))}H.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?
-mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);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<=e||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])c(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);("1"==urlParams.sketch||1E3<=e)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch&&(this.initFormatWindow(),this.formatWindow.window.toggleMinimized()));var m=this,n=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));m.defaultLibraryName=
-mxResources.get("untitledLibrary");var p=document.createElement("div");p.className="geMenubarContainer";var q=null,t=new Menubar(m,p);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 u=m.hideCurrentMenu;m.hideCurrentMenu=function(){u.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
-var v=m.descriptorChanged;m.descriptorChanged=function(){v.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);p.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else p.removeAttribute("title")};m.setStatusText(m.editor.getStatus());p.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;";p.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,x=document.createElement("div");x.style.cssText=
-"position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";m.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var y=m.menus.get("viewZoom"),A="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,C="1"==urlParams.sketch?document.createElement("div"):null,I="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null,ba=mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(n.stylesheet.styles),
-this.sidebar.graph.defaultForegroundColor=n.defaultForegroundColor,this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));n.refresh();n.view.validateBackground()});m.addListener("darkModeChanged",ba);m.addListener("sketchModeChanged",ba);var oa=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)W.style.left="10px",W.style.top="10px",I.style.left="10px",I.style.top="60px",C.style.top="10px",C.style.right=
-"12px",C.style.left="",m.diagramContainer.setAttribute("data-bounds",m.diagramContainer.style.top+" "+m.diagramContainer.style.left+" "+m.diagramContainer.style.width+" "+m.diagramContainer.style.height),m.diagramContainer.style.top="0px",m.diagramContainer.style.left="0px",m.diagramContainer.style.bottom="0px",m.diagramContainer.style.right="0px",m.diagramContainer.style.width="",m.diagramContainer.style.height="";else{var b=m.diagramContainer.getAttribute("data-bounds");if(null!=b){m.diagramContainer.style.background=
-"transparent";m.diagramContainer.removeAttribute("data-bounds");var c=n.getGraphBounds(),b=b.split(" ");m.diagramContainer.style.top=b[0];m.diagramContainer.style.left=b[1];m.diagramContainer.style.width=c.width+50+"px";m.diagramContainer.style.height=c.height+46+"px";m.diagramContainer.style.bottom="";m.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:m.diagramContainer.getBoundingClientRect()}),"*");m.refresh()}W.style.left=m.diagramContainer.offsetLeft+
-"px";W.style.top=m.diagramContainer.offsetTop-W.offsetHeight-4+"px";I.style.display="";I.style.left=m.diagramContainer.offsetLeft-I.offsetWidth-4+"px";I.style.top=m.diagramContainer.offsetTop+"px";C.style.left=m.diagramContainer.offsetLeft+m.diagramContainer.offsetWidth-C.offsetWidth+"px";C.style.top=W.style.top;C.style.right="";m.bottomResizer.style.left=m.diagramContainer.offsetLeft+(m.diagramContainer.offsetWidth-m.bottomResizer.offsetWidth)/2+"px";m.bottomResizer.style.top=m.diagramContainer.offsetTop+
-m.diagramContainer.offsetHeight-m.bottomResizer.offsetHeight/2-1+"px";m.rightResizer.style.left=m.diagramContainer.offsetLeft+m.diagramContainer.offsetWidth-m.rightResizer.offsetWidth/2-1+"px";m.rightResizer.style.top=m.diagramContainer.offsetTop+(m.diagramContainer.offsetHeight-m.bottomResizer.offsetHeight)/2+"px"}m.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";m.rightResizer.style.visibility=m.bottomResizer.style.visibility;p.style.display="none";W.style.visibility="";C.style.visibility=
-""}),fa=mxUtils.bind(this,function(){ia.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";oa()}),ba=mxUtils.bind(this,function(){fa();b(m,!0);m.initFormatWindow();var c=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(c.x+c.width+4,c.y)});m.addListener("inlineFullscreenChanged",fa);m.addListener("editInlineStart",
-ba);"1"==urlParams.embedInline&&m.addListener("darkModeChanged",ba);m.addListener("editInlineStop",mxUtils.bind(this,function(b){m.diagramContainer.style.width="10px";m.diagramContainer.style.height="10px";m.diagramContainer.style.border="";m.bottomResizer.style.visibility="hidden";m.rightResizer.style.visibility="hidden";W.style.visibility="hidden";C.style.visibility="hidden";I.style.display="none"}));Graph.touchStyle&&(n.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==
-b.getState()&&!mxEvent.isMouseEvent(c)&&!n.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=m.hoverIcons){var ja=m.hoverIcons.update;m.hoverIcons.update=function(){n.freehand.isDrawing()||ja.apply(this,arguments)}}if(null!=n.freehand){var na=n.freehand.createStyle;n.freehand.createStyle=function(b){return na.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){I.className="geToolbarContainer";C.className="geToolbarContainer";
-W.className="geToolbarContainer";p.className="geToolbarContainer";m.picker=I;var pa=!1;mxEvent.addListener(p,"mouseenter",function(){m.statusContainer.style.display="inline-block"});mxEvent.addListener(p,"mouseleave",function(){pa||(m.statusContainer.style.display="none")});var ka=mxUtils.bind(this,function(b){null!=m.notificationBtn&&(null!=b?m.notificationBtn.setAttribute("title",b):m.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed?(p.style.visibility=14>p.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&&"function"===typeof m.statusContainer.firstChild.getAttribute&&null==m.statusContainer.firstChild.getAttribute("class")){var b=null!=m.statusContainer.firstChild&&"function"===typeof m.statusContainer.firstChild.getAttribute?m.statusContainer.firstChild.getAttribute("title"):m.editor.getStatus();ka(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",pa=!0):6<m.buttonContainer.clientWidth&&(m.statusContainer.style.display="none",pa=!1)}else m.statusContainer.style.display="inline-block",ka(null),pa=!0;p.style.visibility=12<p.clientWidth?"":"hidden"}))):m.editor.addListener("statusChanged",
-mxUtils.bind(this,function(){p.style.visibility=16<p.clientWidth?"":"hidden"}));P=d("diagram",null,Editor.menuImage);P.style.boxShadow="none";P.style.padding="6px";P.style.margin="0px";W.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);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(e-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 Y=document.createElement("a");Y.style.padding="0px";Y.style.boxShadow="none";Y.className="geMenuItem";Y.style.display="inline-block";
-Y.style.width="40px";Y.style.height="12px";Y.style.marginBottom="-2px";Y.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Y.style.backgroundPosition="top center";Y.style.backgroundRepeat="no-repeat";Y.setAttribute("title","Minimize");var Z=!1,R=mxUtils.bind(this,function(){I.innerHTML="";if(!Z){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(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)");c(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;",
+App.MODE_ATLAS?d.menus.addMenuItems(b,["save","synchronize","-"],c):"1"!=urlParams.noFileMenu&&(d.menus.addMenuItems(b,["new"],c),d.menus.addSubmenu("openFrom",b,c),isLocalStorage&&this.addSubmenu("openRecent",b,c),"1"!=urlParams.sketch&&(b.addSeparator(c),null!=e&&e.constructor==DriveFile&&d.menus.addMenuItems(b,["share"],c),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||d.menus.addMenuItems(b,["synchronize"],c)),b.addSeparator(c),d.menus.addSubmenu("save",b,c));
+d.menus.addSubmenu("exportAs",b,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.menus.addMenuItems(b,["import"],c):"1"!=urlParams.noFileMenu&&d.menus.addSubmenu("importFrom",b,c);"1"!=urlParams.sketch&&(d.menus.addMenuItems(b,["-","outline"],c),d.commentsSupported()&&d.menus.addMenuItems(b,["comments"],c));d.menus.addMenuItems(b,["-","findReplace","layers","tags"],c);d.menus.addMenuItems(b,["-","pageSetup","pageScale"],c);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(b,
+["print"],c);null!=e&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(e=null!=e.getTitle()?e.getTitle():d.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["-","properties"]));b.addSeparator(c);d.menus.addSubmenu("help",b,c);"1"==urlParams.embed?"1"!=urlParams.noExitBtn&&d.menus.addMenuItems(b,["-","exit"],c):"1"!=urlParams.noFileMenu&&d.menus.addMenuItems(b,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(b,c){var e=d.getCurrentFile();null!=e&&e.constructor==
+DriveFile?d.menus.addMenuItems(b,["save","makeCopy","-","rename","moveToFolder"],c):(d.menus.addMenuItems(b,["save","saveAs","-","rename"],c),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(b,["upload"],c):d.menus.addMenuItems(b,["makeCopy"],c));"1"!=urlParams.sketch||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==e||e.constructor==LocalFile||d.menus.addMenuItems(b,["-","synchronize"],c);d.menus.addMenuItems(b,["-","autosave"],c);null!=e&&
+e.isRevisionHistorySupported()&&d.menus.addMenuItems(b,["-","revisionHistory"],c)})));var k=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){k.funct(b,c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||d.menus.addMenuItems(b,["publishLink"],c);d.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(b.addSeparator(c),d.menus.addSubmenu("embed",b,c))})));var l=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(b,c){d.menus.addInsertTableCellItem(b,c)})));
+var m=this.get("importFrom");this.put("importFrom",new Menu(mxUtils.bind(this,function(b,c){m.funct(b,c);this.addMenuItems(b,["editDiagram"],c);"1"==urlParams.sketch&&(b.addSeparator(c),b.addItem(mxResources.get("csv")+"...",null,function(){d.showImportCsvDialog()},c,null,mxUtils.bind(e,e.isEnabled)),d.addInsertMenuItems(b,c,["formatSql","-","fromText","plantUml","mermaid"]))})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.menus.addSubmenu("theme",
+b,c);null!=l&&d.menus.addSubmenu("language",b,c);d.menus.addSubmenu("units",b,c);b.addSeparator(c);d.menus.addMenuItems(b,"scrollbars tooltips ruler - copyConnect collapseExpand -".split(" "),c);"1"==urlParams.sketch&&this.addMenuItems(b,["toggleSketchMode"],c);"1"!=urlParams.embedInline&&(this.addMenuItems(b,["toggleDarkMode"],c),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&d.menus.addMenuItems(b,["-","showStartScreen","search","scratchpad"],c),"1"==urlParams.sketch&&null==urlParams.pages&&
+this.addMenuItems(b,["togglePagesVisible"],c));b.addSeparator(c);d.menus.addMenuItem(b,"configuration",c);!d.isOfflineApp()&&isLocalStorage&&d.menus.addMenuItem(b,"plugins",c);this.addMenuItems(b,["-","fullscreen"],c);b.addSeparator(c)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,c){d.menus.addMenuItems(b,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),c)})));mxUtils.bind(this,function(){var b=this.get("insert"),c=b.funct;b.funct=function(b,
+e){"1"==urlParams.sketch?(d.menus.addMenuItems(b,["insertFreehand"],e),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(b,["insertTemplate"],e)):(c.apply(this,arguments),d.menus.addSubmenu("table",b,e),b.addSeparator(e));d.menus.addMenuItems(b,["-","toggleShapes"],e)}})();var n="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),p=function(b,c,e,f){b.addItem(e,null,mxUtils.bind(this,function(){var b=new CreateGraphDialog(d,e,f);d.showDialog(b.container,
+620,420,!0,!1);b.init()}),c)};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 C=!1;EditorUi.prototype.initFormatWindow=function(){if(!C){C=!0;this.formatWindow.window.setClosable(!1);var b=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){b.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()}))}};var H=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(b,c,d){var e=m.menus.get(b),
+f=t.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),q);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("+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?p.insertBefore(k,m.statusContainer):p.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),n.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?p.insertBefore(d,m.statusContainer):p.appendChild(d);return d}function k(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(W.style.left=58>I.offsetTop-I.offsetHeight/2?"70px":"10px");else{for(var b=p.firstChild;null!=b;){var c=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=c}q=p.firstChild;e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
+var b=1E3>e||"1"==urlParams.sketch,k=null;b||(k=d("diagram"));c=b?d("diagram",null,Editor.drawLogoImage):null;null!=c&&(k=c);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);c=d("insert",!0,b?A:null);
+g([c,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<=e&&(g([ea,ha],60),520<=e&&g([wa,640<=e?f("",sa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",sa,Editor.zoomInImage):null,640<=e?f("",U.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",U,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));c=m.menus.get("language");null!=c&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e&&"1"!=urlParams.sketch?(null==qa&&(c=t.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.className="geToolbarButton",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="center center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize=
+"24px 24px",c.style.position="absolute",c.style.height="24px",c.style.width="24px",c.style.zIndex="1",c.style.right="8px",c.style.cursor="pointer",c.style.top="1"==urlParams.embed?"12px":"11px",p.appendChild(c),qa=c),m.buttonContainer.style.paddingRight="34px"):(m.buttonContainer.style.paddingRight="4px",null!=qa&&(qa.parentNode.removeChild(qa),qa=null))}H.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:
+null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);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<=e||null!=urlParams.clibs||null!=urlParams.libs||
+null!=urlParams["search-shapes"])c(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);("1"==urlParams.sketch||1E3<=e)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch&&(this.initFormatWindow(),this.formatWindow.window.toggleMinimized()));var m=this,n=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));
+m.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.className="geMenubarContainer";var q=null,t=new Menubar(m,p);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 u=m.hideCurrentMenu;m.hideCurrentMenu=function(){u.apply(this,
+arguments);this.editor.graph.popupMenuHandler.hideMenu()};var v=m.descriptorChanged;m.descriptorChanged=function(){v.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);p.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else p.removeAttribute("title")};m.setStatusText(m.editor.getStatus());p.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;";p.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,x=document.createElement("div");x.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";m.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";var y=m.menus.get("viewZoom"),A="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,C="1"==urlParams.sketch?document.createElement("div"):null,I="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null,ba=mxUtils.bind(this,
+function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(n.stylesheet.styles),this.sidebar.graph.defaultForegroundColor=n.defaultForegroundColor,this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&(this.scratchpad=null,this.toggleScratchpad()));n.refresh();n.view.validateBackground()});m.addListener("darkModeChanged",ba);m.addListener("sketchModeChanged",ba);var oa=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)W.style.left=
+"10px",W.style.top="10px",I.style.left="10px",I.style.top="60px",C.style.top="10px",C.style.right="12px",C.style.left="",m.diagramContainer.setAttribute("data-bounds",m.diagramContainer.style.top+" "+m.diagramContainer.style.left+" "+m.diagramContainer.style.width+" "+m.diagramContainer.style.height),m.diagramContainer.style.top="0px",m.diagramContainer.style.left="0px",m.diagramContainer.style.bottom="0px",m.diagramContainer.style.right="0px",m.diagramContainer.style.width="",m.diagramContainer.style.height=
+"";else{var b=m.diagramContainer.getAttribute("data-bounds");if(null!=b){m.diagramContainer.style.background="transparent";m.diagramContainer.removeAttribute("data-bounds");var c=n.getGraphBounds(),b=b.split(" ");m.diagramContainer.style.top=b[0];m.diagramContainer.style.left=b[1];m.diagramContainer.style.width=c.width+50+"px";m.diagramContainer.style.height=c.height+46+"px";m.diagramContainer.style.bottom="";m.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
+rect:m.diagramContainer.getBoundingClientRect()}),"*");m.refresh()}W.style.left=m.diagramContainer.offsetLeft+"px";W.style.top=m.diagramContainer.offsetTop-W.offsetHeight-4+"px";I.style.display="";I.style.left=m.diagramContainer.offsetLeft-I.offsetWidth-4+"px";I.style.top=m.diagramContainer.offsetTop+"px";C.style.left=m.diagramContainer.offsetLeft+m.diagramContainer.offsetWidth-C.offsetWidth+"px";C.style.top=W.style.top;C.style.right="";m.bottomResizer.style.left=m.diagramContainer.offsetLeft+(m.diagramContainer.offsetWidth-
+m.bottomResizer.offsetWidth)/2+"px";m.bottomResizer.style.top=m.diagramContainer.offsetTop+m.diagramContainer.offsetHeight-m.bottomResizer.offsetHeight/2-1+"px";m.rightResizer.style.left=m.diagramContainer.offsetLeft+m.diagramContainer.offsetWidth-m.rightResizer.offsetWidth/2-1+"px";m.rightResizer.style.top=m.diagramContainer.offsetTop+(m.diagramContainer.offsetHeight-m.bottomResizer.offsetHeight)/2+"px"}m.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";m.rightResizer.style.visibility=
+m.bottomResizer.style.visibility;p.style.display="none";W.style.visibility="";C.style.visibility=""}),fa=mxUtils.bind(this,function(){ia.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";oa()}),ba=mxUtils.bind(this,function(){fa();b(m,!0);m.initFormatWindow();var c=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(c.x+
+c.width+4,c.y)});m.addListener("inlineFullscreenChanged",fa);m.addListener("editInlineStart",ba);"1"==urlParams.embedInline&&m.addListener("darkModeChanged",ba);m.addListener("editInlineStop",mxUtils.bind(this,function(b){m.diagramContainer.style.width="10px";m.diagramContainer.style.height="10px";m.diagramContainer.style.border="";m.bottomResizer.style.visibility="hidden";m.rightResizer.style.visibility="hidden";W.style.visibility="hidden";C.style.visibility="hidden";I.style.display="none"}));Graph.touchStyle&&
+(n.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!n.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=m.hoverIcons){var ja=m.hoverIcons.update;m.hoverIcons.update=function(){n.freehand.isDrawing()||ja.apply(this,arguments)}}if(null!=n.freehand){var na=n.freehand.createStyle;n.freehand.createStyle=function(b){return na.apply(this,arguments)+"sketch=0;"}}if("1"==
+urlParams.sketch){I.className="geToolbarContainer";C.className="geToolbarContainer";W.className="geToolbarContainer";p.className="geToolbarContainer";m.picker=I;var pa=!1;mxEvent.addListener(p,"mouseenter",function(){m.statusContainer.style.display="inline-block"});mxEvent.addListener(p,"mouseleave",function(){pa||(m.statusContainer.style.display="none")});var ka=mxUtils.bind(this,function(b){null!=m.notificationBtn&&(null!=b?m.notificationBtn.setAttribute("title",b):m.notificationBtn.removeAttribute("title"))});
+"1"!=urlParams.embed?(p.style.visibility=14>p.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&&"function"===typeof m.statusContainer.firstChild.getAttribute&&null==m.statusContainer.firstChild.getAttribute("class")){var b=null!=m.statusContainer.firstChild&&"function"===typeof m.statusContainer.firstChild.getAttribute?m.statusContainer.firstChild.getAttribute("title"):
+m.editor.getStatus();ka(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",pa=!0):6<m.buttonContainer.clientWidth&&(m.statusContainer.style.display="none",pa=!1)}else m.statusContainer.style.display="inline-block",ka(null),pa=!0;p.style.visibility=12<p.clientWidth?"":
+"hidden"}))):m.editor.addListener("statusChanged",mxUtils.bind(this,function(){p.style.visibility=16<p.clientWidth?"":"hidden"}));P=d("diagram",null,Editor.menuImage);P.style.boxShadow="none";P.style.padding="6px";P.style.margin="0px";W.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);
+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(e-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 Y=document.createElement("a");Y.style.padding="0px";Y.style.boxShadow=
+"none";Y.className="geMenuItem";Y.style.display="inline-block";Y.style.width="40px";Y.style.height="12px";Y.style.marginBottom="-2px";Y.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Y.style.backgroundPosition="top center";Y.style.backgroundRepeat="no-repeat";Y.setAttribute("title","Minimize");var Z=!1,R=mxUtils.bind(this,function(){I.innerHTML="";if(!Z){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(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)");c(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"));c(m.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(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,n.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(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=n.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,
20),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=c(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+
@@ -3998,7 +3999,7 @@ null!=m.actions.layersWindow&&m.actions.layersWindow.window.fit();null!=m.menus.
l.style.position="absolute";l.style.width="10px";l.style.height="10px";l.style.borderRadius="5px";l.style.border="1px solid gray";l.style.background="#ffffff";l.style.cursor="row-resize";m.diagramContainer.parentNode.appendChild(l);m.bottomResizer=l;var za=null,Aa=null,Da=null,Ea=null;mxEvent.addGestureListeners(l,function(b){Ea=parseInt(m.diagramContainer.style.height);Aa=mxEvent.getClientY(b);n.popupMenuHandler.hideMenu();mxEvent.consume(b)});l=l.cloneNode(!1);l.style.cursor="col-resize";m.diagramContainer.parentNode.appendChild(l);
m.rightResizer=l;mxEvent.addGestureListeners(l,function(b){Da=parseInt(m.diagramContainer.style.width);za=mxEvent.getClientX(b);n.popupMenuHandler.hideMenu();mxEvent.consume(b)});mxEvent.addGestureListeners(document.body,null,function(b){var c=!1;null!=za&&(m.diagramContainer.style.width=Math.max(20,Da+mxEvent.getClientX(b)-za)+"px",c=!0);null!=Aa&&(m.diagramContainer.style.height=Math.max(20,Ea+mxEvent.getClientY(b)-Aa)+"px",c=!0);c&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
fullscreen:Editor.inlineFullscreen,rect:m.diagramContainer.getBoundingClientRect()}),"*"),m.fireEvent(new mxEventObject("editInlineStart")),m.refresh())},function(b){null==za&&null==Aa||mxEvent.consume(b);Aa=za=null});n.defaultPageBackgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";m.bottomResizer.style.visibility="hidden";m.rightResizer.style.visibility="hidden";W.style.visibility="hidden";C.style.visibility="hidden";I.style.display=
-"none"}"1"==urlParams.prefetchFonts&&m.editor.loadFonts()}}};(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\nembedFonts=Embed Fonts\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\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\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;
+"none"}"1"==urlParams.prefetchFonts&&m.editor.loadFonts()}}};(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\nembedFonts=Embed Fonts\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\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\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="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><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="default"/><add as="fontColor" value="default"/></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="default"/><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="default"/><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"]?
@@ -4008,18 +4009,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 p=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!=p&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),p=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 u=this.graph.getGraphBounds;this.graph.getGraphBounds=function(b){var c=u.apply(this,arguments);b=this.backgroundImage;if(null!=b){var d=this.view.translate,e=this.view.scale,c=mxRectangle.fromRectangle(c);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 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 u=this.graph.getGraphBounds;this.graph.getGraphBounds=function(b){var c=u.apply(this,arguments);b=this.backgroundImage;if(null!=b){var d=this.view.translate,e=this.view.scale,c=mxRectangle.fromRectangle(c);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 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};
+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};
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 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.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.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),
@@ -4027,31 +4028,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 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",
+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",
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,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 m=p.getCell(k[l]);null!=m&&(t=!0,f[m.id]=!0)}else for(l=0;l<e.length;l++)m=p.getChildAt(p.root,parseInt(e[l])),null!=m&&(t=!0,f[m.id]=!0);for(l=
-0;t&&l<d;l++)m=p.getChildAt(p.root,l),p.setVisible(m,f[m.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.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.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,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?
+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?
"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)?p():t(30))}})}for(var l=this.toolbarItems,m=0,q=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");
+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,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 C=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");C.style.borderRightStyle="none";C.style.paddingLeft="0px";C.style.paddingRight="0px";e.appendChild(v);var H=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");H.style.paddingLeft="0px";H.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";C.style.display=v.style.display;H.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 D=this.graph.getModel(),E=b(mxUtils.bind(this,function(b){if(null!=q)q.parentNode.removeChild(q),
-q=null;else{q=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(q,"mouseleave",function(){q.parentNode.removeChild(q);q=null});b=E.getBoundingClientRect();q.style.width="140px";q.style.padding="2px 0px 2px 0px";q.style.border="1px solid #d0d0d0";q.style.backgroundColor="#eee";q.style.fontFamily=Editor.defaultHtmlFont;q.style.fontSize=
-"11px";q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(q,80);var c=mxUtils.getDocumentScrollOrigin(document);q.style.left=c.x+b.left-1+"px";q.style.top=c.y+b.bottom-2+"px";document.body.appendChild(q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");D.addListener(mxEvent.CHANGE,function(){E.style.display=1<D.getChildCount(D.root)?"inline-block":"none"});E.style.display=1<D.getChildCount(D.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var M=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=M.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");D.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){M.style.display=0<
+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 D=this.graph.getModel(),E=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=E.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");D.addListener(mxEvent.CHANGE,function(){E.style.display=1<D.getChildCount(D.root)?"inline-block":"none"});E.style.display=1<D.getChildCount(D.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var M=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!=u)u.parentNode.removeChild(u),u=null;else{u=q.div;mxEvent.addListener(u,"mouseleave",function(){u.parentNode.removeChild(u);u=null});b=M.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);q.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");D.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){M.style.display=0<
this.graph.getAllTags().length?"inline-block":"none"}));M.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 G=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"==G&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(e);var f=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=q&&(q.parentNode.removeChild(q),q=null);c.style.border=G});mxEvent.addListener(document,"mousemove",function(b){for(b=mxEvent.getSource(b);null!=b;){if(b==
-c||b==e||b==q)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"==G&&(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=G});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)};
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()}))};
@@ -4061,7 +4062,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()}),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,
+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,
"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};
@@ -4071,9 +4072,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 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=
+(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=
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"==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,M,G,K=function(){if((M=c.offsetWidth)!=q||(G=c.offsetHeight)!=t)m=!0,q=M,t=G;l()},B=function(b,c,d){b.attachEvent?
+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,M,G,K=function(){if((M=c.offsetWidth)!=q||(G=c.offsetHeight)!=t)m=!0,q=M,t=G;l()},B=function(b,c,d){b.attachEvent?
b.attachEvent("on"+c,d):b.addEventListener(c,d)};B(e,"scroll",K);B(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.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 63a35d63..4ca7f59b 100644
--- a/src/main/webapp/mxgraph/mxClient.js
+++ b/src/main/webapp/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"15.5.8",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.5.9",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 86dad81a..09d7da07 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:"77e9e78baca677be0d38d00c34a72f4e"},{url:"js/extensions.min.js",revision:"8f6625690fa713232aedd263ba09d115"},{url:"js/stencils.min.js",revision:"8ada746d21157d3d47e6ad3abbbcc3ab"},{url:"js/shapes-14-6-5.min.js",revision:"966d6d7fd2b6a3ddf7098a12982e31f7"},{url:"js/math-print.js",revision:"9d98c920695f6c3395da4b68f723e60a"},{url:"index.html",revision:"28ab148081b0ccd22ad2db634d538b6b"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/grapheditor.css",revision:"00339c600732790e04874fb33825899c"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"3179f617dd02efd2cefeb8c06f965880"},{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:"2bd24fa6170f9f98c594cdf531127a54"},{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:"01caa325f3ad3f6565e0b4228907fb63"},{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:"ff6d6e41b861a30d0b39ac80bd34afa7"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"c0c8dc057fd346abf2993d2c7b09adf5"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"887d3ac605a7bb297067537e7c1f5686"},{url:"connect/confluence/viewer-init.js",revision:"4a60c6c805cab7bc782f1e52f7818d9f"},{url:"connect/confluence/viewer.js",revision:"8679465f38382a2d3811ba5b6fbb0d5d"},{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:"8b670f4b6ccde55358851da705ae884f"},{url:"connect/confluence/includeDiagram.html",revision:"c03c89622d22227313645900af4e3c3d"},{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:"b383eb72a1a9237af76c73742c175d7b"},{url:"resources/dia_am.txt",revision:"e55067ae4d55857d3070f396ede3763a"},{url:"resources/dia_ar.txt",revision:"dc10e48a9af84289ca4f184d44ad5bca"},{url:"resources/dia_bg.txt",revision:"fc89630a0eb923047517cd94f7a214ba"},{url:"resources/dia_bn.txt",revision:"66f3d38b47e70fde02749a6e14916b0b"},{url:"resources/dia_bs.txt",revision:"f540f69f3cc75675b5045d34bae33991"},{url:"resources/dia_ca.txt",revision:"d78617c2e9e999eb75ff70c155dfc15a"},{url:"resources/dia_cs.txt",revision:"9922d6c8edb082b57b54361de5ef367a"},{url:"resources/dia_da.txt",revision:"d0cf005e4b117c4bb8736b34257fa53f"},{url:"resources/dia_de.txt",revision:"c9db127ff9921fd13bfaf3a1c4481a19"},{url:"resources/dia_el.txt",revision:"bde5f6b632a7fb3a5cdc8bcc3c8a21de"},{url:"resources/dia_eo.txt",revision:"4e4ea2bb8617e6844cb6c381edc07136"},{url:"resources/dia_es.txt",revision:"7b377b96724bb48fd88087ee78fab6dd"},{url:"resources/dia_et.txt",revision:"f761f425860c66c0b95e9dee38af544b"},{url:"resources/dia_eu.txt",revision:"877f76f596cefd9a2579be44ff123e46"},{url:"resources/dia_fa.txt",revision:"f527c1d3f3053544ce9ce7e8a4bdb25f"},{url:"resources/dia_fi.txt",revision:"f12cff9b660dc51b44e7844c1fb9ff8f"},{url:"resources/dia_fil.txt",revision:"2356557138b9aa9c58b17c3f2c3713ba"},{url:"resources/dia_fr.txt",revision:"3de1d090961ce832eef5ca054b18a9bf"},{url:"resources/dia_gl.txt",revision:"6f89c6614d0e52e34d13c2bbb570a71d"},{url:"resources/dia_gu.txt",revision:"f325d0bc7ce01bfe2d1a5342848a6463"},{url:"resources/dia_he.txt",revision:"55a669d7455bb036de5814ea1ac56737"},{url:"resources/dia_hi.txt",revision:"437d7b2e7b6dea531305d6694242f3a4"},{url:"resources/dia_hr.txt",revision:"b7ce2dfccd64f4ef1bbf08146d6c7e54"},{url:"resources/dia_hu.txt",revision:"5358c536ef8667aca0526dc6e1ae2903"},{url:"resources/dia_id.txt",revision:"1ec7bae1342609fa287b4d8999f7fa8d"},{url:"resources/dia_it.txt",revision:"ce1daa6eb8a2252f5f28306e2c4c7a58"},{url:"resources/dia_ja.txt",revision:"141b274dd11e7780d4045c1fa1cad8fa"},{url:"resources/dia_kn.txt",revision:"21633a3d2a7126cd54176cb217c626ea"},{url:"resources/dia_ko.txt",revision:"1045fd33a5abb795e9bd69e47d5030ca"},{url:"resources/dia_lt.txt",revision:"bac0df086b9f5b81014325c8b90b17aa"},{url:"resources/dia_lv.txt",revision:"979679783b20b8320dcb27f226713e64"},{url:"resources/dia_ml.txt",revision:"58db4d45d0229ed787828efd2b421f73"},{url:"resources/dia_mr.txt",revision:"230aaef82f89671e5e2a38dda30e3dd6"},{url:"resources/dia_ms.txt",revision:"c48e8fe6d32bedf9983da01aabeb6adf"},{url:"resources/dia_my.txt",revision:"b383eb72a1a9237af76c73742c175d7b"},{url:"resources/dia_nl.txt",revision:"139a8d6c5a09df090746dd3c7feac125"},{url:"resources/dia_no.txt",revision:"a7c2f933cfcd3d920a577c94c5d78630"},{url:"resources/dia_pl.txt",revision:"b82d913f6fcbb933c012448230a13de1"},{url:"resources/dia_pt-br.txt",revision:"f349ee2484358fda66d76246ceee3171"},{url:"resources/dia_pt.txt",revision:"29fd615b2c5e638911ffee5c6157074b"},{url:"resources/dia_ro.txt",revision:"280076b30ec48f27f529c747040e9042"},{url:"resources/dia_ru.txt",revision:"3953375ca885848789c46c352d450746"},{url:"resources/dia_si.txt",revision:"b383eb72a1a9237af76c73742c175d7b"},{url:"resources/dia_sk.txt",revision:"251cdfff7b7e0643f310c2675cd6a590"},{url:"resources/dia_sl.txt",revision:"2f37c20dc4ab20a4534b809ece82a42d"},{url:"resources/dia_sr.txt",revision:"0bff657d99483eb38765b1055d42adb1"},{url:"resources/dia_sv.txt",revision:"6620ba44472e9aebcf8d1fb41e820d76"},{url:"resources/dia_sw.txt",revision:"749592107e620923cb2307b2b80fcbb1"},{url:"resources/dia_ta.txt",revision:"44175b7066417421d6db7fed1bbc5fe0"},{url:"resources/dia_te.txt",revision:"e4bf4fb58853a29110a9579eddfe5881"},{url:"resources/dia_th.txt",revision:"687cfcd42587633e303b2e1f5eb1d2c4"},{url:"resources/dia_tr.txt",revision:"415f3ff69ed302728f47625c749fdf67"},{url:"resources/dia_uk.txt",revision:"9ff1fd58a63812a716a8f677002e9f59"},{url:"resources/dia_vi.txt",revision:"04e395181dbfa61f20805b25514765fd"},{url:"resources/dia_zh-tw.txt",revision:"29e9bd7cec3f06c6df629406a2327005"},{url:"resources/dia_zh.txt",revision:"7cb113801ebccb23ae4736b9cb27e289"},{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 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:"08c66aa5ac5e72061f1a2f6fea4eaa56"},{url:"js/extensions.min.js",revision:"8f6625690fa713232aedd263ba09d115"},{url:"js/stencils.min.js",revision:"8ada746d21157d3d47e6ad3abbbcc3ab"},{url:"js/shapes-14-6-5.min.js",revision:"966d6d7fd2b6a3ddf7098a12982e31f7"},{url:"js/math-print.js",revision:"9d98c920695f6c3395da4b68f723e60a"},{url:"index.html",revision:"28ab148081b0ccd22ad2db634d538b6b"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/grapheditor.css",revision:"00339c600732790e04874fb33825899c"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"3179f617dd02efd2cefeb8c06f965880"},{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:"d61121373d37251911199c6fb5e32db9"},{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:"01caa325f3ad3f6565e0b4228907fb63"},{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:"ff6d6e41b861a30d0b39ac80bd34afa7"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"c0c8dc057fd346abf2993d2c7b09adf5"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"887d3ac605a7bb297067537e7c1f5686"},{url:"connect/confluence/viewer-init.js",revision:"4a60c6c805cab7bc782f1e52f7818d9f"},{url:"connect/confluence/viewer.js",revision:"8679465f38382a2d3811ba5b6fbb0d5d"},{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:"8b670f4b6ccde55358851da705ae884f"},{url:"connect/confluence/includeDiagram.html",revision:"c03c89622d22227313645900af4e3c3d"},{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:"b383eb72a1a9237af76c73742c175d7b"},{url:"resources/dia_am.txt",revision:"e55067ae4d55857d3070f396ede3763a"},{url:"resources/dia_ar.txt",revision:"dc10e48a9af84289ca4f184d44ad5bca"},{url:"resources/dia_bg.txt",revision:"fc89630a0eb923047517cd94f7a214ba"},{url:"resources/dia_bn.txt",revision:"66f3d38b47e70fde02749a6e14916b0b"},{url:"resources/dia_bs.txt",revision:"f540f69f3cc75675b5045d34bae33991"},{url:"resources/dia_ca.txt",revision:"d78617c2e9e999eb75ff70c155dfc15a"},{url:"resources/dia_cs.txt",revision:"9922d6c8edb082b57b54361de5ef367a"},{url:"resources/dia_da.txt",revision:"d0cf005e4b117c4bb8736b34257fa53f"},{url:"resources/dia_de.txt",revision:"c9db127ff9921fd13bfaf3a1c4481a19"},{url:"resources/dia_el.txt",revision:"bde5f6b632a7fb3a5cdc8bcc3c8a21de"},{url:"resources/dia_eo.txt",revision:"4e4ea2bb8617e6844cb6c381edc07136"},{url:"resources/dia_es.txt",revision:"7b377b96724bb48fd88087ee78fab6dd"},{url:"resources/dia_et.txt",revision:"f761f425860c66c0b95e9dee38af544b"},{url:"resources/dia_eu.txt",revision:"877f76f596cefd9a2579be44ff123e46"},{url:"resources/dia_fa.txt",revision:"f527c1d3f3053544ce9ce7e8a4bdb25f"},{url:"resources/dia_fi.txt",revision:"f12cff9b660dc51b44e7844c1fb9ff8f"},{url:"resources/dia_fil.txt",revision:"2356557138b9aa9c58b17c3f2c3713ba"},{url:"resources/dia_fr.txt",revision:"3de1d090961ce832eef5ca054b18a9bf"},{url:"resources/dia_gl.txt",revision:"6f89c6614d0e52e34d13c2bbb570a71d"},{url:"resources/dia_gu.txt",revision:"f325d0bc7ce01bfe2d1a5342848a6463"},{url:"resources/dia_he.txt",revision:"55a669d7455bb036de5814ea1ac56737"},{url:"resources/dia_hi.txt",revision:"437d7b2e7b6dea531305d6694242f3a4"},{url:"resources/dia_hr.txt",revision:"b7ce2dfccd64f4ef1bbf08146d6c7e54"},{url:"resources/dia_hu.txt",revision:"5358c536ef8667aca0526dc6e1ae2903"},{url:"resources/dia_id.txt",revision:"1ec7bae1342609fa287b4d8999f7fa8d"},{url:"resources/dia_it.txt",revision:"ce1daa6eb8a2252f5f28306e2c4c7a58"},{url:"resources/dia_ja.txt",revision:"141b274dd11e7780d4045c1fa1cad8fa"},{url:"resources/dia_kn.txt",revision:"21633a3d2a7126cd54176cb217c626ea"},{url:"resources/dia_ko.txt",revision:"1045fd33a5abb795e9bd69e47d5030ca"},{url:"resources/dia_lt.txt",revision:"bac0df086b9f5b81014325c8b90b17aa"},{url:"resources/dia_lv.txt",revision:"979679783b20b8320dcb27f226713e64"},{url:"resources/dia_ml.txt",revision:"58db4d45d0229ed787828efd2b421f73"},{url:"resources/dia_mr.txt",revision:"230aaef82f89671e5e2a38dda30e3dd6"},{url:"resources/dia_ms.txt",revision:"c48e8fe6d32bedf9983da01aabeb6adf"},{url:"resources/dia_my.txt",revision:"b383eb72a1a9237af76c73742c175d7b"},{url:"resources/dia_nl.txt",revision:"139a8d6c5a09df090746dd3c7feac125"},{url:"resources/dia_no.txt",revision:"a7c2f933cfcd3d920a577c94c5d78630"},{url:"resources/dia_pl.txt",revision:"b82d913f6fcbb933c012448230a13de1"},{url:"resources/dia_pt-br.txt",revision:"f349ee2484358fda66d76246ceee3171"},{url:"resources/dia_pt.txt",revision:"29fd615b2c5e638911ffee5c6157074b"},{url:"resources/dia_ro.txt",revision:"280076b30ec48f27f529c747040e9042"},{url:"resources/dia_ru.txt",revision:"3953375ca885848789c46c352d450746"},{url:"resources/dia_si.txt",revision:"b383eb72a1a9237af76c73742c175d7b"},{url:"resources/dia_sk.txt",revision:"251cdfff7b7e0643f310c2675cd6a590"},{url:"resources/dia_sl.txt",revision:"2f37c20dc4ab20a4534b809ece82a42d"},{url:"resources/dia_sr.txt",revision:"0bff657d99483eb38765b1055d42adb1"},{url:"resources/dia_sv.txt",revision:"6620ba44472e9aebcf8d1fb41e820d76"},{url:"resources/dia_sw.txt",revision:"749592107e620923cb2307b2b80fcbb1"},{url:"resources/dia_ta.txt",revision:"44175b7066417421d6db7fed1bbc5fe0"},{url:"resources/dia_te.txt",revision:"e4bf4fb58853a29110a9579eddfe5881"},{url:"resources/dia_th.txt",revision:"687cfcd42587633e303b2e1f5eb1d2c4"},{url:"resources/dia_tr.txt",revision:"415f3ff69ed302728f47625c749fdf67"},{url:"resources/dia_uk.txt",revision:"9ff1fd58a63812a716a8f677002e9f59"},{url:"resources/dia_vi.txt",revision:"04e395181dbfa61f20805b25514765fd"},{url:"resources/dia_zh-tw.txt",revision:"29e9bd7cec3f06c6df629406a2327005"},{url:"resources/dia_zh.txt",revision:"7cb113801ebccb23ae4736b9cb27e289"},{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 27d650ea..4da3b187 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/e65e71738544675fd76905aaed24ade2/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\": \"77e9e78baca677be0d38d00c34a72f4e\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"8f6625690fa713232aedd263ba09d115\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"8ada746d21157d3d47e6ad3abbbcc3ab\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"966d6d7fd2b6a3ddf7098a12982e31f7\"\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\": \"00339c600732790e04874fb33825899c\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"3179f617dd02efd2cefeb8c06f965880\"\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\": \"2bd24fa6170f9f98c594cdf531127a54\"\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\": \"01caa325f3ad3f6565e0b4228907fb63\"\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\": \"ff6d6e41b861a30d0b39ac80bd34afa7\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"c0c8dc057fd346abf2993d2c7b09adf5\"\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\": \"887d3ac605a7bb297067537e7c1f5686\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"4a60c6c805cab7bc782f1e52f7818d9f\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"8679465f38382a2d3811ba5b6fbb0d5d\"\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\": \"8b670f4b6ccde55358851da705ae884f\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"c03c89622d22227313645900af4e3c3d\"\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\": \"b383eb72a1a9237af76c73742c175d7b\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"e55067ae4d55857d3070f396ede3763a\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"dc10e48a9af84289ca4f184d44ad5bca\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"fc89630a0eb923047517cd94f7a214ba\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"66f3d38b47e70fde02749a6e14916b0b\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"f540f69f3cc75675b5045d34bae33991\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"d78617c2e9e999eb75ff70c155dfc15a\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"9922d6c8edb082b57b54361de5ef367a\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"d0cf005e4b117c4bb8736b34257fa53f\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"c9db127ff9921fd13bfaf3a1c4481a19\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"bde5f6b632a7fb3a5cdc8bcc3c8a21de\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"4e4ea2bb8617e6844cb6c381edc07136\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"7b377b96724bb48fd88087ee78fab6dd\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"f761f425860c66c0b95e9dee38af544b\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"877f76f596cefd9a2579be44ff123e46\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"f527c1d3f3053544ce9ce7e8a4bdb25f\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"f12cff9b660dc51b44e7844c1fb9ff8f\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"2356557138b9aa9c58b17c3f2c3713ba\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"3de1d090961ce832eef5ca054b18a9bf\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"6f89c6614d0e52e34d13c2bbb570a71d\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"f325d0bc7ce01bfe2d1a5342848a6463\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"55a669d7455bb036de5814ea1ac56737\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"437d7b2e7b6dea531305d6694242f3a4\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"b7ce2dfccd64f4ef1bbf08146d6c7e54\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"5358c536ef8667aca0526dc6e1ae2903\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"1ec7bae1342609fa287b4d8999f7fa8d\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"ce1daa6eb8a2252f5f28306e2c4c7a58\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"141b274dd11e7780d4045c1fa1cad8fa\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"21633a3d2a7126cd54176cb217c626ea\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"1045fd33a5abb795e9bd69e47d5030ca\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"bac0df086b9f5b81014325c8b90b17aa\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"979679783b20b8320dcb27f226713e64\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"58db4d45d0229ed787828efd2b421f73\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"230aaef82f89671e5e2a38dda30e3dd6\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"c48e8fe6d32bedf9983da01aabeb6adf\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b383eb72a1a9237af76c73742c175d7b\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"139a8d6c5a09df090746dd3c7feac125\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"a7c2f933cfcd3d920a577c94c5d78630\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"b82d913f6fcbb933c012448230a13de1\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"f349ee2484358fda66d76246ceee3171\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"29fd615b2c5e638911ffee5c6157074b\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"280076b30ec48f27f529c747040e9042\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"3953375ca885848789c46c352d450746\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b383eb72a1a9237af76c73742c175d7b\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"251cdfff7b7e0643f310c2675cd6a590\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"2f37c20dc4ab20a4534b809ece82a42d\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"0bff657d99483eb38765b1055d42adb1\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"6620ba44472e9aebcf8d1fb41e820d76\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"749592107e620923cb2307b2b80fcbb1\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"44175b7066417421d6db7fed1bbc5fe0\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"e4bf4fb58853a29110a9579eddfe5881\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"687cfcd42587633e303b2e1f5eb1d2c4\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"415f3ff69ed302728f47625c749fdf67\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"9ff1fd58a63812a716a8f677002e9f59\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"04e395181dbfa61f20805b25514765fd\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"29e9bd7cec3f06c6df629406a2327005\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"7cb113801ebccb23ae4736b9cb27e289\"\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/f4f3a2f2f5868773aad3af4b74009d0b/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\": \"08c66aa5ac5e72061f1a2f6fea4eaa56\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"8f6625690fa713232aedd263ba09d115\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"8ada746d21157d3d47e6ad3abbbcc3ab\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"966d6d7fd2b6a3ddf7098a12982e31f7\"\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\": \"00339c600732790e04874fb33825899c\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"3179f617dd02efd2cefeb8c06f965880\"\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\": \"d61121373d37251911199c6fb5e32db9\"\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\": \"01caa325f3ad3f6565e0b4228907fb63\"\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\": \"ff6d6e41b861a30d0b39ac80bd34afa7\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"c0c8dc057fd346abf2993d2c7b09adf5\"\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\": \"887d3ac605a7bb297067537e7c1f5686\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"4a60c6c805cab7bc782f1e52f7818d9f\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"8679465f38382a2d3811ba5b6fbb0d5d\"\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\": \"8b670f4b6ccde55358851da705ae884f\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"c03c89622d22227313645900af4e3c3d\"\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\": \"b383eb72a1a9237af76c73742c175d7b\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"e55067ae4d55857d3070f396ede3763a\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"dc10e48a9af84289ca4f184d44ad5bca\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"fc89630a0eb923047517cd94f7a214ba\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"66f3d38b47e70fde02749a6e14916b0b\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"f540f69f3cc75675b5045d34bae33991\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"d78617c2e9e999eb75ff70c155dfc15a\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"9922d6c8edb082b57b54361de5ef367a\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"d0cf005e4b117c4bb8736b34257fa53f\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"c9db127ff9921fd13bfaf3a1c4481a19\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"bde5f6b632a7fb3a5cdc8bcc3c8a21de\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"4e4ea2bb8617e6844cb6c381edc07136\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"7b377b96724bb48fd88087ee78fab6dd\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"f761f425860c66c0b95e9dee38af544b\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"877f76f596cefd9a2579be44ff123e46\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"f527c1d3f3053544ce9ce7e8a4bdb25f\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"f12cff9b660dc51b44e7844c1fb9ff8f\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"2356557138b9aa9c58b17c3f2c3713ba\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"3de1d090961ce832eef5ca054b18a9bf\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"6f89c6614d0e52e34d13c2bbb570a71d\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"f325d0bc7ce01bfe2d1a5342848a6463\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"55a669d7455bb036de5814ea1ac56737\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"437d7b2e7b6dea531305d6694242f3a4\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"b7ce2dfccd64f4ef1bbf08146d6c7e54\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"5358c536ef8667aca0526dc6e1ae2903\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"1ec7bae1342609fa287b4d8999f7fa8d\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"ce1daa6eb8a2252f5f28306e2c4c7a58\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"141b274dd11e7780d4045c1fa1cad8fa\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"21633a3d2a7126cd54176cb217c626ea\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"1045fd33a5abb795e9bd69e47d5030ca\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"bac0df086b9f5b81014325c8b90b17aa\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"979679783b20b8320dcb27f226713e64\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"58db4d45d0229ed787828efd2b421f73\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"230aaef82f89671e5e2a38dda30e3dd6\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"c48e8fe6d32bedf9983da01aabeb6adf\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b383eb72a1a9237af76c73742c175d7b\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"139a8d6c5a09df090746dd3c7feac125\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"a7c2f933cfcd3d920a577c94c5d78630\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"b82d913f6fcbb933c012448230a13de1\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"f349ee2484358fda66d76246ceee3171\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"29fd615b2c5e638911ffee5c6157074b\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"280076b30ec48f27f529c747040e9042\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"3953375ca885848789c46c352d450746\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b383eb72a1a9237af76c73742c175d7b\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"251cdfff7b7e0643f310c2675cd6a590\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"2f37c20dc4ab20a4534b809ece82a42d\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"0bff657d99483eb38765b1055d42adb1\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"6620ba44472e9aebcf8d1fb41e820d76\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"749592107e620923cb2307b2b80fcbb1\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"44175b7066417421d6db7fed1bbc5fe0\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"e4bf4fb58853a29110a9579eddfe5881\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"687cfcd42587633e303b2e1f5eb1d2c4\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"415f3ff69ed302728f47625c749fdf67\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"9ff1fd58a63812a716a8f677002e9f59\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"04e395181dbfa61f20805b25514765fd\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"29e9bd7cec3f06c6df629406a2327005\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"7cb113801ebccb23ae4736b9cb27e289\"\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